Skip to content

Commit

Permalink
fix: don't reschedule delay timer if closing (#2535)
Browse files Browse the repository at this point in the history
  • Loading branch information
hendrikmoree authored Feb 3, 2023
1 parent 486c148 commit 8a0292a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/queue.js
Original file line number Diff line number Diff line change
Expand Up @@ -945,6 +945,10 @@ Queue.prototype.run = function(concurrency, handlerName) {
at the next known delayed job.
*/
Queue.prototype.updateDelayTimer = function() {
if (this.closing) {
return Promise.resolve();
}

return scripts
.updateDelaySet(this, Date.now())
.then(nextTimestamp => {
Expand Down

0 comments on commit 8a0292a

Please sign in to comment.