Backport pending list never being reprocessed (#438)

Backport of #433 to 0.12.x.

Bump version to 0.12.2
This commit is contained in:
Ilya Kreymer 2023-11-13 19:21:48 -08:00 committed by GitHub
parent dd7b926d87
commit 9ba0b9edc1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View file

@ -1,6 +1,6 @@
{ {
"name": "browsertrix-crawler", "name": "browsertrix-crawler",
"version": "0.12.1", "version": "0.12.2",
"main": "browsertrix-crawler", "main": "browsertrix-crawler",
"type": "module", "type": "module",
"repository": "https://github.com/webrecorder/browsertrix-crawler", "repository": "https://github.com/webrecorder/browsertrix-crawler",

View file

@ -496,7 +496,7 @@ return 0;
const res = await this.redis.hlen(this.pkey); const res = await this.redis.hlen(this.pkey);
// reset pendings // reset pendings
if (res > 0 && !this._lastSize) { if (res > 0 && !(await this.queueSize())) {
await this.resetPendings(); await this.resetPendings();
} }
@ -546,8 +546,7 @@ return 0;
} }
async queueSize() { async queueSize() {
this._lastSize = await this.redis.zcard(this.qkey); return await this.redis.zcard(this.qkey);
return this._lastSize;
} }
async logError(error) { async logError(error) {