Skip to content

Commit 39950f3

Browse files
committed
fix: ensure check if job is dead is ending sometime :-)
1 parent 9cdbf25 commit 39950f3

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hokify/agenda",
3-
"version": "4.0.19",
3+
"version": "4.0.20",
44
"description": "Light weight job scheduler for Node.js",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

src/JobProcessor.ts

+5
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,11 @@ export class JobProcessor {
451451
);
452452
return;
453453
}
454+
// when job is not running anymore, just finish
455+
if (!job.isRunning()) {
456+
resolve();
457+
return;
458+
}
454459
resolve(checkIfJobIsDead());
455460
}, this.processEvery)
456461
);

0 commit comments

Comments
 (0)