Review funkt
This commit is contained in:
9
node_modules/bullmq/dist/cjs/commands/includes/pushBackJobWithPriority.lua
generated
vendored
Normal file
9
node_modules/bullmq/dist/cjs/commands/includes/pushBackJobWithPriority.lua
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
--[[
|
||||
Function to push back job considering priority in front of same prioritized jobs.
|
||||
]]
|
||||
local function pushBackJobWithPriority(prioritizedKey, priority, jobId)
|
||||
-- in order to put it at front of same prioritized jobs
|
||||
-- we consider prioritized counter as 0
|
||||
local score = priority * 0x100000000
|
||||
rcall("ZADD", prioritizedKey, score, jobId)
|
||||
end
|
||||
Reference in New Issue
Block a user