From cca6628f00ebc46865bdbe70a694e413642037c4 Mon Sep 17 00:00:00 2001 From: Jason Ardell Date: Wed, 16 Jan 2013 14:08:46 -0500 Subject: [PATCH] Fix #621 fix job re-queueing on hard shutdown (e.g. SIGTERM). --- lib/sidekiq/manager.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/sidekiq/manager.rb b/lib/sidekiq/manager.rb index 3cc99428..5519543e 100644 --- a/lib/sidekiq/manager.rb +++ b/lib/sidekiq/manager.rb @@ -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")