10 lines
353 B
Lua
10 lines
353 B
Lua
--[[
|
|
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
|