1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Merge pull request #622 from ardell/master

Fix #621 fix job re-queueing on hard shutdown (e.g. SIGTERM).
This commit is contained in:
Mike Perham 2013-01-16 13:03:23 -08:00
commit 53862bda36

View file

@ -124,8 +124,8 @@ module Sidekiq
# that would go to the actor (since it's busy). Instead
# we'll use the object_id to track the worker's data here.
processor.terminate if processor.alive?
msg, queue = @in_progress[processor.object_id]
conn.lpush("queue:#{queue}", msg)
unit_of_work = @in_progress[processor.object_id]
conn.lpush(unit_of_work.queue, unit_of_work.message)
end
end
logger.info("Pushed #{@busy.size} messages back to Redis")