Projektstart
This commit is contained in:
30
backend/node_modules/bullmq/dist/cjs/scripts/extendLock-2.js
generated
vendored
Normal file
30
backend/node_modules/bullmq/dist/cjs/scripts/extendLock-2.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.extendLock = void 0;
|
||||
const content = `--[[
|
||||
Extend lock and removes the job from the stalled set.
|
||||
Input:
|
||||
KEYS[1] 'lock',
|
||||
KEYS[2] 'stalled'
|
||||
ARGV[1] token
|
||||
ARGV[2] lock duration in milliseconds
|
||||
ARGV[3] jobid
|
||||
Output:
|
||||
"1" if lock extented succesfully.
|
||||
]]
|
||||
local rcall = redis.call
|
||||
if rcall("GET", KEYS[1]) == ARGV[1] then
|
||||
-- if rcall("SET", KEYS[1], ARGV[1], "PX", ARGV[2], "XX") then
|
||||
if rcall("SET", KEYS[1], ARGV[1], "PX", ARGV[2]) then
|
||||
rcall("SREM", KEYS[2], ARGV[3])
|
||||
return 1
|
||||
end
|
||||
end
|
||||
return 0
|
||||
`;
|
||||
exports.extendLock = {
|
||||
name: 'extendLock',
|
||||
content,
|
||||
keys: 2,
|
||||
};
|
||||
//# sourceMappingURL=extendLock-2.js.map
|
||||
Reference in New Issue
Block a user