We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ed041e commit e92cea4Copy full SHA for e92cea4
src/classes/worker.ts
@@ -552,7 +552,7 @@ export class Worker<
552
try {
553
this.blockUntil = await this.waiting;
554
555
- if (this.blockUntil <= 0 || this.blockUntil - Date.now() < 10) {
+ if (this.blockUntil <= 0 || this.blockUntil - Date.now() < 1) {
556
return this.moveToActive(client, token, this.opts.name);
557
}
558
} catch (err) {
@@ -626,6 +626,7 @@ export class Worker<
626
? blockTimeout
627
: Math.ceil(blockTimeout);
628
629
+ this.updateDelays(); // reset delays to avoid reusing same values in next iteration
630
// Markers should only be used for un-blocking, so we will handle them in this
631
// function only.
632
const result = await bclient.bzpopmin(this.keys.marker, blockTimeout);
0 commit comments