Review funkt
This commit is contained in:
13
node_modules/bullmq/dist/esm/commands/includes/moveJobFromPrioritizedToActive.lua
generated
vendored
Normal file
13
node_modules/bullmq/dist/esm/commands/includes/moveJobFromPrioritizedToActive.lua
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
--[[
|
||||
Function to move job from prioritized state to active.
|
||||
]]
|
||||
|
||||
local function moveJobFromPrioritizedToActive(priorityKey, activeKey, priorityCounterKey)
|
||||
local prioritizedJob = rcall("ZPOPMIN", priorityKey)
|
||||
if #prioritizedJob > 0 then
|
||||
rcall("LPUSH", activeKey, prioritizedJob[1])
|
||||
return prioritizedJob[1]
|
||||
else
|
||||
rcall("DEL", priorityCounterKey)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user