Projektstart
This commit is contained in:
27
backend/node_modules/bullmq/dist/cjs/scripts/removeDeduplicationKey-1.js
generated
vendored
Normal file
27
backend/node_modules/bullmq/dist/cjs/scripts/removeDeduplicationKey-1.js
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.removeDeduplicationKey = void 0;
|
||||
const content = `--[[
|
||||
Remove deduplication key if it matches the job id.
|
||||
Input:
|
||||
KEYS[1] deduplication key
|
||||
ARGV[1] job id
|
||||
Output:
|
||||
0 - false
|
||||
1 - true
|
||||
]]
|
||||
local rcall = redis.call
|
||||
local deduplicationKey = KEYS[1]
|
||||
local jobId = ARGV[1]
|
||||
local currentJobId = rcall('GET', deduplicationKey)
|
||||
if currentJobId and currentJobId == jobId then
|
||||
return rcall("DEL", deduplicationKey)
|
||||
end
|
||||
return 0
|
||||
`;
|
||||
exports.removeDeduplicationKey = {
|
||||
name: 'removeDeduplicationKey',
|
||||
content,
|
||||
keys: 1,
|
||||
};
|
||||
//# sourceMappingURL=removeDeduplicationKey-1.js.map
|
||||
Reference in New Issue
Block a user