Review funkt
This commit is contained in:
12
node_modules/bullmq/dist/esm/commands/includes/setDeduplicationKey.lua
generated
vendored
Normal file
12
node_modules/bullmq/dist/esm/commands/includes/setDeduplicationKey.lua
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
--[[
|
||||
Function to set the deduplication key for a job.
|
||||
Uses TTL from deduplication opts if provided.
|
||||
]]
|
||||
local function setDeduplicationKey(deduplicationKey, jobId, deduplicationOpts)
|
||||
local ttl = deduplicationOpts and deduplicationOpts['ttl']
|
||||
if ttl and ttl > 0 then
|
||||
rcall('SET', deduplicationKey, jobId, 'PX', ttl)
|
||||
else
|
||||
rcall('SET', deduplicationKey, jobId)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user