Skip to content

Commit 1bfc0be

Browse files
committed
cleanup
1 parent c89b4aa commit 1bfc0be

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/util/state.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -496,10 +496,6 @@ export class RedisDedupeIndex {
496496

497497
// if orig size is not known, queue for later to resolve
498498
if (!origRecSize) {
499-
//pipe.lpush(`rev:${hash}`, JSON.stringify({ size, crawlId }));
500-
// pipe.hincrby("rev", `${hash}:s`, size);
501-
// pipe.hincrby("rev", `${hash}:c`, 1);
502-
503499
pipe.hincrby(`rev:${hash}:s`, crawlId, size);
504500
pipe.hincrby(`rev:${hash}:c`, crawlId, 1);
505501
}
@@ -516,7 +512,7 @@ export class RedisDedupeIndex {
516512

517513
async matchRevisitSize(hash: string, origSize: number) {
518514
const revCounts = await this.dedupeRedis.hgetall(`rev:${hash}:c`);
519-
if (!revCounts || !Object.keys(revCounts).length) {
515+
if (!Object.keys(revCounts).length) {
520516
return;
521517
}
522518
const revSizes = await this.dedupeRedis.hgetall(`rev:${hash}:s`);

0 commit comments

Comments
 (0)