bullmq 5.1.6 → 5.1.7
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/cjs/classes/scripts.js +1 -0
- package/dist/cjs/classes/scripts.js.map +1 -1
- package/dist/cjs/commands/{reprocessJob-6.lua → reprocessJob-7.lua} +9 -4
- package/dist/cjs/scripts/index.js +1 -1
- package/dist/cjs/scripts/{reprocessJob-6.js → reprocessJob-7.js} +36 -6
- package/dist/cjs/scripts/reprocessJob-7.js.map +1 -0
- package/dist/cjs/tsconfig-cjs.tsbuildinfo +1 -1
- package/dist/esm/classes/scripts.js +1 -0
- package/dist/esm/classes/scripts.js.map +1 -1
- package/dist/esm/commands/{reprocessJob-6.lua → reprocessJob-7.lua} +9 -4
- package/dist/esm/scripts/index.d.ts +1 -1
- package/dist/esm/scripts/index.js +1 -1
- package/dist/esm/scripts/reprocessJob-7.js +83 -0
- package/dist/esm/scripts/reprocessJob-7.js.map +1 -0
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/cjs/scripts/reprocessJob-6.js.map +0 -1
- package/dist/esm/scripts/reprocessJob-6.js +0 -53
- package/dist/esm/scripts/reprocessJob-6.js.map +0 -1
- /package/dist/esm/scripts/{reprocessJob-6.d.ts → reprocessJob-7.d.ts} +0 -0
@@ -1,53 +0,0 @@
|
|
1
|
-
const content = `--[[
|
2
|
-
Attempts to reprocess a job
|
3
|
-
Input:
|
4
|
-
KEYS[1] job key
|
5
|
-
KEYS[2] events stream
|
6
|
-
KEYS[3] job state
|
7
|
-
KEYS[4] wait key
|
8
|
-
KEYS[5] meta
|
9
|
-
KEYS[6] paused key
|
10
|
-
ARGV[1] job.id
|
11
|
-
ARGV[2] (job.opts.lifo ? 'R' : 'L') + 'PUSH'
|
12
|
-
ARGV[3] propVal - failedReason/returnvalue
|
13
|
-
ARGV[4] prev state - failed/completed
|
14
|
-
Output:
|
15
|
-
1 means the operation was a success
|
16
|
-
-1 means the job does not exist
|
17
|
-
-3 means the job was not found in the expected set.
|
18
|
-
]]
|
19
|
-
local rcall = redis.call;
|
20
|
-
-- Includes
|
21
|
-
--[[
|
22
|
-
Function to check for the meta.paused key to decide if we are paused or not
|
23
|
-
(since an empty list and !EXISTS are not really the same).
|
24
|
-
]]
|
25
|
-
local function getTargetQueueList(queueMetaKey, waitKey, pausedKey)
|
26
|
-
if rcall("HEXISTS", queueMetaKey, "paused") ~= 1 then
|
27
|
-
return waitKey, false
|
28
|
-
else
|
29
|
-
return pausedKey, true
|
30
|
-
end
|
31
|
-
end
|
32
|
-
if (rcall("EXISTS", KEYS[1]) == 1) then
|
33
|
-
local jobId = ARGV[1]
|
34
|
-
if (rcall("ZREM", KEYS[3], jobId) == 1) then
|
35
|
-
rcall("HDEL", KEYS[1], "finishedOn", "processedOn", ARGV[3])
|
36
|
-
local target = getTargetQueueList(KEYS[5], KEYS[4], KEYS[6])
|
37
|
-
rcall(ARGV[2], target, jobId)
|
38
|
-
-- Emit waiting event
|
39
|
-
rcall("XADD", KEYS[2], "*", "event", "waiting", "jobId", jobId, "prev", ARGV[4]);
|
40
|
-
return 1
|
41
|
-
else
|
42
|
-
return -3
|
43
|
-
end
|
44
|
-
else
|
45
|
-
return -1
|
46
|
-
end
|
47
|
-
`;
|
48
|
-
export const reprocessJob = {
|
49
|
-
name: 'reprocessJob',
|
50
|
-
content,
|
51
|
-
keys: 6,
|
52
|
-
};
|
53
|
-
//# sourceMappingURL=reprocessJob-6.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"reprocessJob-6.js","sourceRoot":"","sources":["../../../src/scripts/reprocessJob-6.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8Cf,CAAC;AACF,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,IAAI,EAAE,cAAc;IACpB,OAAO;IACP,IAAI,EAAE,CAAC;CACR,CAAC"}
|
File without changes
|