@tachybase/plugin-adapter-bullmq 1.3.24 → 1.3.25
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/externalVersion.js +2 -2
- package/dist/node_modules/@bull-board/api/package.json +1 -1
- package/dist/node_modules/@bull-board/koa/package.json +1 -1
- package/dist/node_modules/bullmq/dist/cjs/classes/queue.js +4 -2
- package/dist/node_modules/bullmq/dist/cjs/classes/scripts.js +3 -3
- package/dist/node_modules/bullmq/dist/cjs/classes/worker.js +8 -9
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/moveJobToWait.lua +15 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/moveJobFromActiveToWait-9.lua +5 -1
- package/dist/node_modules/bullmq/dist/cjs/commands/moveStalledJobsToWait-8.lua +3 -11
- package/dist/node_modules/bullmq/dist/cjs/commands/{moveToWaitingChildren-8.lua → moveToWaitingChildren-7.lua} +29 -40
- package/dist/node_modules/bullmq/dist/cjs/enums/error-code.js +1 -1
- package/dist/node_modules/bullmq/dist/cjs/index.js +1 -1
- package/dist/node_modules/bullmq/dist/cjs/scripts/index.js +1 -1
- package/dist/node_modules/bullmq/dist/cjs/scripts/moveJobFromActiveToWait-9.js +5 -1
- package/dist/node_modules/bullmq/dist/cjs/scripts/moveStalledJobsToWait-8.js +12 -8
- package/dist/node_modules/bullmq/dist/cjs/scripts/moveToWaitingChildren-7.js +107 -0
- package/dist/node_modules/bullmq/dist/cjs/tsconfig-cjs.tsbuildinfo +1 -1
- package/dist/node_modules/bullmq/dist/cjs/version.js +1 -1
- package/dist/node_modules/bullmq/dist/esm/classes/queue.d.ts +1 -1
- package/dist/node_modules/bullmq/dist/esm/classes/queue.js +4 -2
- package/dist/node_modules/bullmq/dist/esm/classes/scripts.js +3 -3
- package/dist/node_modules/bullmq/dist/esm/classes/worker.js +8 -9
- package/dist/node_modules/bullmq/dist/esm/commands/includes/moveJobToWait.lua +15 -0
- package/dist/node_modules/bullmq/dist/esm/commands/moveJobFromActiveToWait-9.lua +5 -1
- package/dist/node_modules/bullmq/dist/esm/commands/moveStalledJobsToWait-8.lua +3 -11
- package/dist/node_modules/bullmq/dist/esm/commands/{moveToWaitingChildren-8.lua → moveToWaitingChildren-7.lua} +29 -40
- package/dist/node_modules/bullmq/dist/esm/enums/error-code.d.ts +1 -1
- package/dist/node_modules/bullmq/dist/esm/enums/error-code.js +1 -1
- package/dist/node_modules/bullmq/dist/esm/scripts/index.d.ts +1 -1
- package/dist/node_modules/bullmq/dist/esm/scripts/index.js +1 -1
- package/dist/node_modules/bullmq/dist/esm/scripts/moveJobFromActiveToWait-9.js +5 -1
- package/dist/node_modules/bullmq/dist/esm/scripts/moveStalledJobsToWait-8.js +12 -8
- package/dist/node_modules/bullmq/dist/esm/scripts/moveToWaitingChildren-7.js +104 -0
- package/dist/node_modules/bullmq/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/dist/node_modules/bullmq/dist/esm/version.d.ts +1 -1
- package/dist/node_modules/bullmq/dist/esm/version.js +1 -1
- package/dist/node_modules/bullmq/package.json +1 -1
- package/package.json +6 -6
- package/dist/node_modules/bullmq/dist/cjs/scripts/moveToWaitingChildren-8.js +0 -529
- package/dist/node_modules/bullmq/dist/esm/scripts/moveToWaitingChildren-8.js +0 -526
- /package/dist/node_modules/bullmq/dist/esm/scripts/{moveToWaitingChildren-8.d.ts → moveToWaitingChildren-7.d.ts} +0 -0
package/dist/externalVersion.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@bull-board/api","version":"6.11.1","description":"A Dashboard server API built on top of bull or bullmq.","keywords":["bull","bullmq","redis","queue","monitoring","dashboard"],"repository":{"type":"git","url":"git+https://github.com/felixmosh/bull-board.git","directory":"packages/api"},"license":"MIT","author":"felixmosh","main":"dist/src/index.js","files":["dist","*Adapter.*"],"scripts":{"build":"tsc","clean":"rm -rf dist","test":"jest"},"dependencies":{"redis-info":"^3.1.0"},"devDependencies":{"@types/redis-info":"^3.0.3","@types/supertest":"^2.0.16","bull":"^4.16.5","bullmq":"^5.53.2","ioredis":"^5.6.1","supertest":"^7.1.1"},"peerDependencies":{"@bull-board/ui":"6.11.1"},"publishConfig":{"access":"public"},"_lastModified":"2025-
|
|
1
|
+
{"name":"@bull-board/api","version":"6.11.1","description":"A Dashboard server API built on top of bull or bullmq.","keywords":["bull","bullmq","redis","queue","monitoring","dashboard"],"repository":{"type":"git","url":"git+https://github.com/felixmosh/bull-board.git","directory":"packages/api"},"license":"MIT","author":"felixmosh","main":"dist/src/index.js","files":["dist","*Adapter.*"],"scripts":{"build":"tsc","clean":"rm -rf dist","test":"jest"},"dependencies":{"redis-info":"^3.1.0"},"devDependencies":{"@types/redis-info":"^3.0.3","@types/supertest":"^2.0.16","bull":"^4.16.5","bullmq":"^5.53.2","ioredis":"^5.6.1","supertest":"^7.1.1"},"peerDependencies":{"@bull-board/ui":"6.11.1"},"publishConfig":{"access":"public"},"_lastModified":"2025-09-02T09:52:57.107Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@bull-board/koa","version":"6.11.1","description":"A Koa.js server adapter for Bull-Board dashboard.","keywords":["bull","bullmq","redis","koa","adapter","queue","monitoring","dashboard"],"repository":{"type":"git","url":"git+https://github.com/felixmosh/bull-board.git","directory":"packages/koa"},"license":"MIT","author":"felixmosh","main":"dist/index.js","files":["dist"],"scripts":{"build":"tsc","clean":"rm -rf dist"},"dependencies":{"@bull-board/api":"6.11.1","@bull-board/ui":"6.11.1","@koa/bodyparser":"^5.1.2","@ladjs/koa-views":"^9.0.0","ejs":"^3.1.10","koa":"^3.0.0","koa-mount":"^4.2.0","koa-router":"^13.0.1","koa-static":"^5.0.0"},"devDependencies":{"@types/co-body":"^6.1.3","@types/koa":"^2.15.0","@types/koa-mount":"^4.0.5","@types/koa-router":"^7.4.8","@types/koa-static":"^4.0.4","@types/koa-views":"^7.0.0"},"publishConfig":{"access":"public"},"_lastModified":"2025-
|
|
1
|
+
{"name":"@bull-board/koa","version":"6.11.1","description":"A Koa.js server adapter for Bull-Board dashboard.","keywords":["bull","bullmq","redis","koa","adapter","queue","monitoring","dashboard"],"repository":{"type":"git","url":"git+https://github.com/felixmosh/bull-board.git","directory":"packages/koa"},"license":"MIT","author":"felixmosh","main":"dist/index.js","files":["dist"],"scripts":{"build":"tsc","clean":"rm -rf dist"},"dependencies":{"@bull-board/api":"6.11.1","@bull-board/ui":"6.11.1","@koa/bodyparser":"^5.1.2","@ladjs/koa-views":"^9.0.0","ejs":"^3.1.10","koa":"^3.0.0","koa-mount":"^4.2.0","koa-router":"^13.0.1","koa-static":"^5.0.0"},"devDependencies":{"@types/co-body":"^6.1.3","@types/koa":"^2.15.0","@types/koa-mount":"^4.0.5","@types/koa-router":"^7.4.8","@types/koa-static":"^4.0.4","@types/koa-views":"^7.0.0"},"publishConfig":{"access":"public"},"_lastModified":"2025-09-02T09:53:05.307Z"}
|
|
@@ -537,9 +537,11 @@ class Queue extends queue_getters_1.QueueGetters {
|
|
|
537
537
|
const timestamp = Date.now() - grace;
|
|
538
538
|
let deletedCount = 0;
|
|
539
539
|
const deletedJobsIds = [];
|
|
540
|
+
// Normalize 'waiting' to 'wait' for consistency with internal Redis keys
|
|
541
|
+
const normalizedType = type === 'waiting' ? 'wait' : type;
|
|
540
542
|
while (deletedCount < maxCount) {
|
|
541
|
-
const jobsIds = await this.scripts.cleanJobsInSet(
|
|
542
|
-
this.emit('cleaned', jobsIds,
|
|
543
|
+
const jobsIds = await this.scripts.cleanJobsInSet(normalizedType, timestamp, maxCountPerCall);
|
|
544
|
+
this.emit('cleaned', jobsIds, normalizedType);
|
|
543
545
|
deletedCount += jobsIds.length;
|
|
544
546
|
deletedJobsIds.push(...jobsIds);
|
|
545
547
|
if (jobsIds.length < maxCountPerCall) {
|
|
@@ -14,6 +14,7 @@ const pack = packer.pack;
|
|
|
14
14
|
const enums_1 = require("../enums");
|
|
15
15
|
const utils_1 = require("../utils");
|
|
16
16
|
const version_1 = require("../version");
|
|
17
|
+
const errors_1 = require("./errors");
|
|
17
18
|
class Scripts {
|
|
18
19
|
constructor(queue) {
|
|
19
20
|
this.queue = queue;
|
|
@@ -694,7 +695,6 @@ class Scripts {
|
|
|
694
695
|
`${jobId}:dependencies`,
|
|
695
696
|
`${jobId}:unsuccessful`,
|
|
696
697
|
'stalled',
|
|
697
|
-
'failed',
|
|
698
698
|
'events',
|
|
699
699
|
].map(name => {
|
|
700
700
|
return this.queue.toKey(name);
|
|
@@ -1115,8 +1115,8 @@ class Scripts {
|
|
|
1115
1115
|
return new Error(`The parent job ${parentKey} cannot be replaced. ${command}`);
|
|
1116
1116
|
case enums_1.ErrorCode.JobBelongsToJobScheduler:
|
|
1117
1117
|
return new Error(`Job ${jobId} belongs to a job scheduler and cannot be removed directly. ${command}`);
|
|
1118
|
-
case enums_1.ErrorCode.
|
|
1119
|
-
return new
|
|
1118
|
+
case enums_1.ErrorCode.JobHasFailedChildren:
|
|
1119
|
+
return new errors_1.UnrecoverableError(`Cannot complete job ${jobId} because it has at least one failed child. ${command}`);
|
|
1120
1120
|
default:
|
|
1121
1121
|
return new Error(`Unknown code ${code} error for ${jobId}. ${command}`);
|
|
1122
1122
|
}
|
|
@@ -225,8 +225,7 @@ class Worker extends queue_base_1.QueueBase {
|
|
|
225
225
|
const jobsInProgress = new Set();
|
|
226
226
|
this.startLockExtenderTimer(jobsInProgress);
|
|
227
227
|
let tokenPostfix = 0;
|
|
228
|
-
while (!this.closing && !this.paused) {
|
|
229
|
-
let numTotal = asyncFifoQueue.numTotal();
|
|
228
|
+
while ((!this.closing && !this.paused) || asyncFifoQueue.numTotal() > 0) {
|
|
230
229
|
/**
|
|
231
230
|
* This inner loop tries to fetch jobs concurrently, but if we are waiting for a job
|
|
232
231
|
* to arrive at the queue we should not try to fetch more jobs (as it would be pointless)
|
|
@@ -234,13 +233,12 @@ class Worker extends queue_base_1.QueueBase {
|
|
|
234
233
|
while (!this.closing &&
|
|
235
234
|
!this.paused &&
|
|
236
235
|
!this.waiting &&
|
|
237
|
-
numTotal < this._concurrency &&
|
|
236
|
+
asyncFifoQueue.numTotal() < this._concurrency &&
|
|
238
237
|
!this.isRateLimited()) {
|
|
239
238
|
const token = `${this.id}:${tokenPostfix++}`;
|
|
240
239
|
const fetchedJob = this.retryIfFailed(() => this._getNextJob(client, bclient, token, { block: true }), this.opts.runRetryDelay);
|
|
241
240
|
asyncFifoQueue.add(fetchedJob);
|
|
242
|
-
|
|
243
|
-
if (this.waiting && numTotal > 1) {
|
|
241
|
+
if (this.waiting && asyncFifoQueue.numTotal() > 1) {
|
|
244
242
|
// We are waiting for jobs but we have others that we could start processing already
|
|
245
243
|
break;
|
|
246
244
|
}
|
|
@@ -248,7 +246,7 @@ class Worker extends queue_base_1.QueueBase {
|
|
|
248
246
|
// to Redis in high concurrency scenarios.
|
|
249
247
|
const job = await fetchedJob;
|
|
250
248
|
// No more jobs waiting but we have others that could start processing already
|
|
251
|
-
if (!job && numTotal > 1) {
|
|
249
|
+
if (!job && asyncFifoQueue.numTotal() > 1) {
|
|
252
250
|
break;
|
|
253
251
|
}
|
|
254
252
|
// If there are potential jobs to be processed and blockUntil is set, we should exit to avoid waiting
|
|
@@ -271,7 +269,6 @@ class Worker extends queue_base_1.QueueBase {
|
|
|
271
269
|
await this.waitForRateLimit();
|
|
272
270
|
}
|
|
273
271
|
}
|
|
274
|
-
return asyncFifoQueue.waitAll();
|
|
275
272
|
}
|
|
276
273
|
/**
|
|
277
274
|
* Returns a promise that resolves to the next job in queue.
|
|
@@ -464,7 +461,7 @@ class Worker extends queue_base_1.QueueBase {
|
|
|
464
461
|
// Add next scheduled job if necessary.
|
|
465
462
|
if (job.opts.repeat && !job.nextRepeatableJobId) {
|
|
466
463
|
// Use new job scheduler if possible
|
|
467
|
-
if (job.repeatJobKey) {
|
|
464
|
+
if (job.repeatJobKey && job.repeatJobKey.split(':').length < 5) {
|
|
468
465
|
const jobScheduler = await this.jobScheduler;
|
|
469
466
|
await jobScheduler.upsertJobScheduler(job.repeatJobKey, job.opts.repeat, job.name, job.data, job.opts, { override: false, producerId: job.id });
|
|
470
467
|
}
|
|
@@ -576,7 +573,9 @@ class Worker extends queue_base_1.QueueBase {
|
|
|
576
573
|
});
|
|
577
574
|
if (!this.paused) {
|
|
578
575
|
this.paused = true;
|
|
579
|
-
|
|
576
|
+
if (!doNotWaitActive) {
|
|
577
|
+
await this.whenCurrentJobsFinished();
|
|
578
|
+
}
|
|
580
579
|
(_a = this.stalledCheckStopper) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
581
580
|
this.emit('paused');
|
|
582
581
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
--[[
|
|
2
|
+
Function to move job to wait to be picked up by a waiting worker.
|
|
3
|
+
]]
|
|
4
|
+
|
|
5
|
+
-- Includes
|
|
6
|
+
--- @include "addJobInTargetList"
|
|
7
|
+
--- @include "getTargetQueueList"
|
|
8
|
+
|
|
9
|
+
local function moveJobToWait(metaKey, activeKey, waitKey, pausedKey, markerKey, eventStreamKey,
|
|
10
|
+
jobId, pushCmd)
|
|
11
|
+
local target, isPausedOrMaxed = getTargetQueueList(metaKey, activeKey, waitKey, pausedKey)
|
|
12
|
+
addJobInTargetList(target, markerKey, pushCmd, isPausedOrMaxed, jobId)
|
|
13
|
+
|
|
14
|
+
rcall("XADD", eventStreamKey, "*", "event", "waiting", "jobId", jobId, 'prev', 'active')
|
|
15
|
+
end
|
|
@@ -29,6 +29,10 @@ local jobId = ARGV[1]
|
|
|
29
29
|
local token = ARGV[2]
|
|
30
30
|
local jobKey = ARGV[3]
|
|
31
31
|
|
|
32
|
+
if rcall("EXISTS", jobKey) == 0 then
|
|
33
|
+
return -1
|
|
34
|
+
end
|
|
35
|
+
|
|
32
36
|
local errorCode = removeLock(jobKey, KEYS[3], token, jobId)
|
|
33
37
|
if errorCode < 0 then
|
|
34
38
|
return errorCode
|
|
@@ -60,4 +64,4 @@ if pttl > 0 then
|
|
|
60
64
|
return pttl
|
|
61
65
|
else
|
|
62
66
|
return 0
|
|
63
|
-
end
|
|
67
|
+
end
|
|
@@ -25,6 +25,7 @@ local rcall = redis.call
|
|
|
25
25
|
--- @include "includes/addJobInTargetList"
|
|
26
26
|
--- @include "includes/batches"
|
|
27
27
|
--- @include "includes/getTargetQueueList"
|
|
28
|
+
--- @include "includes/moveJobToWait"
|
|
28
29
|
--- @include "includes/trimEvents"
|
|
29
30
|
|
|
30
31
|
local stalledKey = KEYS[1]
|
|
@@ -73,20 +74,11 @@ if (#stalling > 0) then
|
|
|
73
74
|
-- If this job has been stalled too many times, such as if it crashes the worker, then fail it.
|
|
74
75
|
local stalledCount = rcall("HINCRBY", jobKey, "stc", 1)
|
|
75
76
|
if stalledCount > maxStalledJobCount then
|
|
76
|
-
local jobAttributes = rcall("HMGET", jobKey, "opts", "parent")
|
|
77
|
-
local rawOpts = jobAttributes[1]
|
|
78
|
-
local rawParentData = jobAttributes[2]
|
|
79
|
-
local opts = cjson.decode(rawOpts)
|
|
80
|
-
|
|
81
77
|
local failedReason = "job stalled more than allowable limit"
|
|
82
78
|
rcall("HSET", jobKey, "defa", failedReason)
|
|
83
79
|
end
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
-- Move the job back to the wait queue, to immediately be picked up by a waiting worker.
|
|
87
|
-
addJobInTargetList(target, markerKey, "RPUSH", isPausedOrMaxed, jobId)
|
|
88
|
-
|
|
89
|
-
rcall("XADD", eventStreamKey, "*", "event", "waiting", "jobId", jobId, 'prev', 'active')
|
|
80
|
+
moveJobToWait(metaKey, activeKey, waitKey, pausedKey, markerKey, eventStreamKey, jobId,
|
|
81
|
+
"RPUSH")
|
|
90
82
|
|
|
91
83
|
-- Emit the stalled event
|
|
92
84
|
rcall("XADD", eventStreamKey, "*", "event", "stalled", "jobId", jobId)
|
|
@@ -8,8 +8,7 @@
|
|
|
8
8
|
KEYS[4] job dependencies key
|
|
9
9
|
KEYS[5] job unsuccessful key
|
|
10
10
|
KEYS[6] stalled key
|
|
11
|
-
KEYS[7]
|
|
12
|
-
KEYS[8] events key
|
|
11
|
+
KEYS[7] events key
|
|
13
12
|
|
|
14
13
|
ARGV[1] token
|
|
15
14
|
ARGV[2] child key
|
|
@@ -23,6 +22,7 @@
|
|
|
23
22
|
-1 - Missing job.
|
|
24
23
|
-2 - Missing lock
|
|
25
24
|
-3 - Job not in active set
|
|
25
|
+
-9 - Job has failed children
|
|
26
26
|
]]
|
|
27
27
|
local rcall = redis.call
|
|
28
28
|
local activeKey = KEYS[1]
|
|
@@ -31,71 +31,60 @@ local jobKey = KEYS[3]
|
|
|
31
31
|
local jobDependenciesKey = KEYS[4]
|
|
32
32
|
local jobUnsuccessfulKey = KEYS[5]
|
|
33
33
|
local stalledKey = KEYS[6]
|
|
34
|
-
local
|
|
34
|
+
local eventStreamKey = KEYS[7]
|
|
35
|
+
local token = ARGV[1]
|
|
35
36
|
local timestamp = ARGV[3]
|
|
36
37
|
local jobId = ARGV[4]
|
|
37
38
|
|
|
38
39
|
--- Includes
|
|
39
|
-
--- @include "includes/moveChildFromDependenciesIfNeeded"
|
|
40
|
-
--- @include "includes/removeDeduplicationKeyIfNeededOnFinalization"
|
|
41
|
-
--- @include "includes/removeJobsOnFail"
|
|
42
40
|
--- @include "includes/removeLock"
|
|
43
41
|
|
|
44
|
-
local function
|
|
45
|
-
|
|
46
|
-
local
|
|
42
|
+
local function removeJobFromActive(activeKey, stalledKey, jobKey, jobId,
|
|
43
|
+
token)
|
|
44
|
+
local errorCode = removeLock(jobKey, stalledKey, token, jobId)
|
|
45
|
+
if errorCode < 0 then
|
|
46
|
+
return errorCode
|
|
47
|
+
end
|
|
47
48
|
|
|
48
49
|
local numRemovedElements = rcall("LREM", activeKey, -1, jobId)
|
|
49
50
|
|
|
50
|
-
if
|
|
51
|
+
if numRemovedElements < 1 then
|
|
51
52
|
return -3
|
|
52
53
|
end
|
|
53
54
|
|
|
54
|
-
rcall("ZADD", waitingChildrenKey, score, jobId)
|
|
55
|
-
|
|
56
55
|
return 0
|
|
57
56
|
end
|
|
58
57
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
local failedReason = "children are failed"
|
|
67
|
-
rcall("ZADD", failedKey, timestamp, jobId)
|
|
68
|
-
rcall("HSET", jobKey, "finishedOn", timestamp)
|
|
69
|
-
rcall("XADD", KEYS[8], "*", "event", "failed", "jobId", jobId, "failedReason",
|
|
70
|
-
failedReason, "prev", "active")
|
|
58
|
+
local function moveToWaitingChildren(activeKey, waitingChildrenKey, stalledKey, eventStreamKey,
|
|
59
|
+
jobKey, jobId, timestamp, token)
|
|
60
|
+
local errorCode = removeJobFromActive(activeKey, stalledKey, jobKey, jobId, token)
|
|
61
|
+
if errorCode < 0 then
|
|
62
|
+
return errorCode
|
|
63
|
+
end
|
|
71
64
|
|
|
72
|
-
|
|
73
|
-
local rawOpts = jobAttributes[3]
|
|
74
|
-
local opts = cjson.decode(rawOpts)
|
|
65
|
+
local score = tonumber(timestamp)
|
|
75
66
|
|
|
76
|
-
|
|
67
|
+
rcall("ZADD", waitingChildrenKey, score, jobId)
|
|
68
|
+
rcall("XADD", eventStreamKey, "*", "event", "waiting-children", "jobId", jobId, 'prev', 'active')
|
|
77
69
|
|
|
78
|
-
|
|
70
|
+
return 0
|
|
71
|
+
end
|
|
79
72
|
|
|
80
|
-
|
|
73
|
+
if rcall("EXISTS", jobKey) == 1 then
|
|
74
|
+
if rcall("ZCARD", jobUnsuccessfulKey) ~= 0 then
|
|
75
|
+
return -9
|
|
81
76
|
else
|
|
82
77
|
if ARGV[2] ~= "" then
|
|
83
78
|
if rcall("SISMEMBER", jobDependenciesKey, ARGV[2]) ~= 0 then
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
return errorCode
|
|
87
|
-
end
|
|
88
|
-
return moveToWaitingChildren(activeKey, waitingChildrenKey, jobId, timestamp)
|
|
79
|
+
return moveToWaitingChildren(activeKey, waitingChildrenKey, stalledKey, eventStreamKey,
|
|
80
|
+
jobKey, jobId, timestamp, token)
|
|
89
81
|
end
|
|
90
82
|
|
|
91
83
|
return 1
|
|
92
84
|
else
|
|
93
85
|
if rcall("SCARD", jobDependenciesKey) ~= 0 then
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
return errorCode
|
|
97
|
-
end
|
|
98
|
-
return moveToWaitingChildren(activeKey, waitingChildrenKey, jobId, timestamp)
|
|
86
|
+
return moveToWaitingChildren(activeKey, waitingChildrenKey, stalledKey, eventStreamKey,
|
|
87
|
+
jobKey, jobId, timestamp, token)
|
|
99
88
|
end
|
|
100
89
|
|
|
101
90
|
return 1
|
|
@@ -11,6 +11,6 @@ var ErrorCode;
|
|
|
11
11
|
ErrorCode[ErrorCode["JobLockMismatch"] = -6] = "JobLockMismatch";
|
|
12
12
|
ErrorCode[ErrorCode["ParentJobCannotBeReplaced"] = -7] = "ParentJobCannotBeReplaced";
|
|
13
13
|
ErrorCode[ErrorCode["JobBelongsToJobScheduler"] = -8] = "JobBelongsToJobScheduler";
|
|
14
|
-
ErrorCode[ErrorCode["
|
|
14
|
+
ErrorCode[ErrorCode["JobHasFailedChildren"] = -9] = "JobHasFailedChildren";
|
|
15
15
|
})(ErrorCode = exports.ErrorCode || (exports.ErrorCode = {}));
|
|
16
16
|
//# sourceMappingURL=error-code.js.map
|