agenda 6.2.0 → 6.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/types/JobQuery.js
CHANGED
|
@@ -7,8 +7,8 @@ export function computeJobState(job, now = new Date()) {
|
|
|
7
7
|
if (lockedAt) {
|
|
8
8
|
return 'running';
|
|
9
9
|
}
|
|
10
|
-
// Failed: has failed and failure is
|
|
11
|
-
if (failedAt && (!lastFinishedAt || failedAt
|
|
10
|
+
// Failed: has failed and failure is at least as recent as completion
|
|
11
|
+
if (failedAt && (!lastFinishedAt || failedAt >= lastFinishedAt)) {
|
|
12
12
|
return 'failed';
|
|
13
13
|
}
|
|
14
14
|
// Repeating: has repeat interval and hasn't failed
|
|
@@ -23,8 +23,8 @@ export function computeJobState(job, now = new Date()) {
|
|
|
23
23
|
if (nextRunAt && nextRunAt <= now) {
|
|
24
24
|
return 'queued';
|
|
25
25
|
}
|
|
26
|
-
// Completed: has finished and either no failure or completion is more recent
|
|
27
|
-
if (lastFinishedAt && (!failedAt || lastFinishedAt
|
|
26
|
+
// Completed: has finished and either no failure or completion is strictly more recent
|
|
27
|
+
if (lastFinishedAt && (!failedAt || lastFinishedAt > failedAt)) {
|
|
28
28
|
return 'completed';
|
|
29
29
|
}
|
|
30
30
|
// Default to completed if nothing else matches
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JobQuery.js","sourceRoot":"","sources":["../../src/types/JobQuery.ts"],"names":[],"mappings":"AAkFA;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,GAAkB,EAAE,MAAY,IAAI,IAAI,EAAE;IACzE,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,GAAG,GAAG,CAAC;IAE9E,2CAA2C;IAC3C,IAAI,QAAQ,EAAE,CAAC;QACd,OAAO,SAAS,CAAC;IAClB,CAAC;IAED,
|
|
1
|
+
{"version":3,"file":"JobQuery.js","sourceRoot":"","sources":["../../src/types/JobQuery.ts"],"names":[],"mappings":"AAkFA;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,GAAkB,EAAE,MAAY,IAAI,IAAI,EAAE;IACzE,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,GAAG,GAAG,CAAC;IAE9E,2CAA2C;IAC3C,IAAI,QAAQ,EAAE,CAAC;QACd,OAAO,SAAS,CAAC;IAClB,CAAC;IAED,qEAAqE;IACrE,IAAI,QAAQ,IAAI,CAAC,CAAC,cAAc,IAAI,QAAQ,IAAI,cAAc,CAAC,EAAE,CAAC;QACjE,OAAO,QAAQ,CAAC;IACjB,CAAC;IAED,mDAAmD;IACnD,IAAI,cAAc,EAAE,CAAC;QACpB,OAAO,WAAW,CAAC;IACpB,CAAC;IAED,uCAAuC;IACvC,IAAI,SAAS,IAAI,SAAS,GAAG,GAAG,EAAE,CAAC;QAClC,OAAO,WAAW,CAAC;IACpB,CAAC;IAED,iDAAiD;IACjD,IAAI,SAAS,IAAI,SAAS,IAAI,GAAG,EAAE,CAAC;QACnC,OAAO,QAAQ,CAAC;IACjB,CAAC;IAED,sFAAsF;IACtF,IAAI,cAAc,IAAI,CAAC,CAAC,QAAQ,IAAI,cAAc,GAAG,QAAQ,CAAC,EAAE,CAAC;QAChE,OAAO,WAAW,CAAC;IACpB,CAAC;IAED,+CAA+C;IAC/C,OAAO,WAAW,CAAC;AACpB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agenda",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.2",
|
|
4
4
|
"description": "Light weight job scheduler for Node.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -8,11 +8,13 @@
|
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
10
|
"types": "./dist/index.d.ts",
|
|
11
|
-
"import": "./dist/index.js"
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"default": "./dist/index.js"
|
|
12
13
|
},
|
|
13
14
|
"./testing": {
|
|
14
15
|
"types": "./test/shared/index.ts",
|
|
15
|
-
"import": "./test/shared/index.ts"
|
|
16
|
+
"import": "./test/shared/index.ts",
|
|
17
|
+
"default": "./test/shared/index.ts"
|
|
16
18
|
}
|
|
17
19
|
},
|
|
18
20
|
"publishConfig": {
|