From d3fa83a091b93dae3921a7fa280268dcee4ddf96 Mon Sep 17 00:00:00 2001 From: Michael Bromley Date: Tue, 30 Mar 2021 21:01:17 +0200 Subject: [PATCH] fix(core): Correctly defer incomplete jobs on shutdown --- packages/core/src/job-queue/polling-job-queue-strategy.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/job-queue/polling-job-queue-strategy.ts b/packages/core/src/job-queue/polling-job-queue-strategy.ts index ce97f674fb..dee2b4ab3b 100644 --- a/packages/core/src/job-queue/polling-job-queue-strategy.ts +++ b/packages/core/src/job-queue/polling-job-queue-strategy.ts @@ -71,7 +71,7 @@ class ActiveQueue = {}> { }, ) .finally(() => { - if (!this.running) { + if (!this.running && nextJob.state !== JobState.PENDING) { return; } nextJob.off('progress', onProgress);