Projektstart
This commit is contained in:
15
backend/node_modules/bullmq/dist/cjs/commands/includes/isJobSchedulerJob.lua
generated
vendored
Normal file
15
backend/node_modules/bullmq/dist/cjs/commands/includes/isJobSchedulerJob.lua
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
--[[
|
||||
Function to check if the job belongs to a job scheduler and
|
||||
current delayed job matches with jobId
|
||||
]]
|
||||
local function isJobSchedulerJob(jobId, jobKey, jobSchedulersKey)
|
||||
local repeatJobKey = rcall("HGET", jobKey, "rjk")
|
||||
if repeatJobKey then
|
||||
local prevMillis = rcall("ZSCORE", jobSchedulersKey, repeatJobKey)
|
||||
if prevMillis then
|
||||
local currentDelayedJobId = "repeat:" .. repeatJobKey .. ":" .. prevMillis
|
||||
return jobId == currentDelayedJobId
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
Reference in New Issue
Block a user