Skip to content

Commit

Permalink
fix(add-job): trim events when waiting-children event is published (#…
Browse files Browse the repository at this point in the history
…2262) (python)
  • Loading branch information
roggervalf authored Nov 5, 2023
1 parent 8fa8b63 commit 198bf05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commands/addJob-9.lua
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ local delayedTimestamp = (delay > 0 and (timestamp + delay)) or 0
local waitChildrenKey = args[6]
if waitChildrenKey ~= nil then
rcall("ZADD", waitChildrenKey, timestamp, jobId)
rcall("XADD", KEYS[8], "*", "event", "waiting-children", "jobId", jobId)
rcall("XADD", KEYS[8], "MAXLEN", "~", maxEvents, "*", "event", "waiting-children", "jobId", jobId)
elseif (delayedTimestamp ~= 0) then
local score = delayedTimestamp * 0x1000 + bit.band(jobCounter, 0xfff)
rcall("ZADD", KEYS[5], score, jobId)
Expand Down

0 comments on commit 198bf05

Please sign in to comment.