@ultimat3/jobs 5.0.1 → 7.0.0
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/package.json +5 -5
- package/src/worker.ts +6 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ultimat3/jobs",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"description": "Durable background work: steps, transactional outbox, cron tasks, one driver interface",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
"test": "bun test"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@ultimat3/core": "
|
|
36
|
-
"@ultimat3/entity": "
|
|
37
|
-
"@ultimat3/schema": "
|
|
38
|
-
"@ultimat3/time": "
|
|
35
|
+
"@ultimat3/core": "7.0.0",
|
|
36
|
+
"@ultimat3/entity": "7.0.0",
|
|
37
|
+
"@ultimat3/schema": "7.0.0",
|
|
38
|
+
"@ultimat3/time": "7.0.0"
|
|
39
39
|
}
|
|
40
40
|
}
|
package/src/worker.ts
CHANGED
|
@@ -31,13 +31,12 @@ const QUEUE_DEPTH_INTERVAL_MS = 15_000;
|
|
|
31
31
|
* is deliberately unmapped: parking a run is control flow, so counting it would make every
|
|
32
32
|
* `step.sleep` read as a finished job and make the failure ratio meaningless.
|
|
33
33
|
*/
|
|
34
|
-
const JOB_OUTCOME_LABELS
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
});
|
|
34
|
+
const JOB_OUTCOME_LABELS = Object.freeze<Record<JobOutcome, 'ok' | 'failed' | 'dead' | null>>({
|
|
35
|
+
completed: 'ok',
|
|
36
|
+
suspended: null,
|
|
37
|
+
retried: 'failed',
|
|
38
|
+
'dead-lettered': 'dead',
|
|
39
|
+
});
|
|
41
40
|
|
|
42
41
|
export interface WorkerOptions {
|
|
43
42
|
readonly driver: JobDriver;
|