bullmq 5.66.5 → 5.66.6
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/commands/includes/moveChildFromDependenciesIfNeeded.lua +4 -11
- package/dist/cjs/commands/includes/removeJobsByMaxAge.lua +2 -3
- package/dist/cjs/commands/moveToFinished-14.lua +2 -1
- package/dist/cjs/interfaces/index.js +0 -1
- package/dist/cjs/interfaces/index.js.map +1 -1
- package/dist/cjs/scripts/moveToFinished-14.js +152 -186
- package/dist/cjs/scripts/moveToFinished-14.js.map +1 -1
- package/dist/cjs/tsconfig-cjs.tsbuildinfo +1 -1
- package/dist/cjs/types/index.js +1 -0
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/{esm/interfaces → cjs/types}/keep-jobs.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/classes/scripts.d.ts +2 -2
- package/dist/esm/commands/includes/moveChildFromDependenciesIfNeeded.lua +4 -11
- package/dist/esm/commands/includes/removeJobsByMaxAge.lua +2 -3
- package/dist/esm/commands/moveToFinished-14.lua +2 -1
- package/dist/esm/interfaces/base-job-options.d.ts +1 -1
- package/dist/esm/interfaces/index.d.ts +0 -1
- package/dist/esm/interfaces/index.js +0 -1
- package/dist/esm/interfaces/index.js.map +1 -1
- package/dist/esm/interfaces/worker-options.d.ts +1 -1
- package/dist/esm/scripts/moveToFinished-14.js +152 -186
- package/dist/esm/scripts/moveToFinished-14.js.map +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/dist/esm/types/index.d.ts +1 -0
- package/dist/esm/types/index.js +1 -0
- package/dist/esm/types/index.js.map +1 -1
- package/dist/esm/{interfaces → types}/keep-jobs.d.ts +12 -3
- package/dist/{cjs/interfaces → esm/types}/keep-jobs.js.map +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/package.json +4 -4
- package/dist/cjs/commands/includes/removeJobsOnFail.lua +0 -36
- package/dist/esm/commands/includes/removeJobsOnFail.lua +0 -36
- /package/dist/cjs/{interfaces → types}/keep-jobs.js +0 -0
- /package/dist/esm/{interfaces → types}/keep-jobs.js +0 -0
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
--[[
|
|
2
|
-
Functions to remove jobs when removeOnFail option is provided.
|
|
3
|
-
]]
|
|
4
|
-
|
|
5
|
-
-- Includes
|
|
6
|
-
--- @include "removeJob"
|
|
7
|
-
--- @include "removeJobsByMaxAge"
|
|
8
|
-
--- @include "removeJobsByMaxCount"
|
|
9
|
-
|
|
10
|
-
local function removeJobsOnFail(queueKeyPrefix, failedKey, jobId, opts, timestamp)
|
|
11
|
-
local removeOnFailType = type(opts["removeOnFail"])
|
|
12
|
-
if removeOnFailType == "number" then
|
|
13
|
-
removeJobsByMaxCount(opts["removeOnFail"],
|
|
14
|
-
failedKey, queueKeyPrefix)
|
|
15
|
-
elseif removeOnFailType == "boolean" then
|
|
16
|
-
if opts["removeOnFail"] then
|
|
17
|
-
removeJob(jobId, false, queueKeyPrefix,
|
|
18
|
-
false --[[remove debounce key]])
|
|
19
|
-
rcall("ZREM", failedKey, jobId)
|
|
20
|
-
end
|
|
21
|
-
elseif removeOnFailType ~= "nil" then
|
|
22
|
-
local maxAge = opts["removeOnFail"]["age"]
|
|
23
|
-
local maxCount = opts["removeOnFail"]["count"]
|
|
24
|
-
|
|
25
|
-
if maxAge ~= nil then
|
|
26
|
-
removeJobsByMaxAge(timestamp, maxAge,
|
|
27
|
-
failedKey, queueKeyPrefix)
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
if maxCount ~= nil and maxCount > 0 then
|
|
31
|
-
removeJobsByMaxCount(maxCount, failedKey,
|
|
32
|
-
queueKeyPrefix)
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
end
|
|
36
|
-
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
--[[
|
|
2
|
-
Functions to remove jobs when removeOnFail option is provided.
|
|
3
|
-
]]
|
|
4
|
-
|
|
5
|
-
-- Includes
|
|
6
|
-
--- @include "removeJob"
|
|
7
|
-
--- @include "removeJobsByMaxAge"
|
|
8
|
-
--- @include "removeJobsByMaxCount"
|
|
9
|
-
|
|
10
|
-
local function removeJobsOnFail(queueKeyPrefix, failedKey, jobId, opts, timestamp)
|
|
11
|
-
local removeOnFailType = type(opts["removeOnFail"])
|
|
12
|
-
if removeOnFailType == "number" then
|
|
13
|
-
removeJobsByMaxCount(opts["removeOnFail"],
|
|
14
|
-
failedKey, queueKeyPrefix)
|
|
15
|
-
elseif removeOnFailType == "boolean" then
|
|
16
|
-
if opts["removeOnFail"] then
|
|
17
|
-
removeJob(jobId, false, queueKeyPrefix,
|
|
18
|
-
false --[[remove debounce key]])
|
|
19
|
-
rcall("ZREM", failedKey, jobId)
|
|
20
|
-
end
|
|
21
|
-
elseif removeOnFailType ~= "nil" then
|
|
22
|
-
local maxAge = opts["removeOnFail"]["age"]
|
|
23
|
-
local maxCount = opts["removeOnFail"]["count"]
|
|
24
|
-
|
|
25
|
-
if maxAge ~= nil then
|
|
26
|
-
removeJobsByMaxAge(timestamp, maxAge,
|
|
27
|
-
failedKey, queueKeyPrefix)
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
if maxCount ~= nil and maxCount > 0 then
|
|
31
|
-
removeJobsByMaxCount(maxCount, failedKey,
|
|
32
|
-
queueKeyPrefix)
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
end
|
|
36
|
-
|
|
File without changes
|
|
File without changes
|