Skip to content

Commit

Permalink
fix(reprocess): do not store job.id in added list
Browse files Browse the repository at this point in the history
  • Loading branch information
manast committed Jun 22, 2021
1 parent 0345369 commit 3fbc506
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/commands/reprocessJob-4.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
-1 means the job is currently locked and can't be retried.
-2 means the job was not found in the expected set.
Events:
emits 'added' if succesfully moved job to wait.
]]
if (redis.call("EXISTS", KEYS[1]) == 1) then
if (redis.call("EXISTS", KEYS[2]) == 0) then
Expand All @@ -28,7 +27,6 @@ if (redis.call("EXISTS", KEYS[1]) == 1) then

if (redis.call("ZREM", KEYS[3], ARGV[1]) == 1) then
redis.call(ARGV[2], KEYS[4], ARGV[1])
redis.call(ARGV[2], KEYS[4] .. ":added", ARGV[1])

-- Emit waiting event (wait..ing@token)
redis.call("PUBLISH", KEYS[4] .. "ing@" .. ARGV[3], ARGV[1])
Expand Down

0 comments on commit 3fbc506

Please sign in to comment.