From 742aeaa90e7b7943440bde9594b6e33e4a9e0f75 Mon Sep 17 00:00:00 2001 From: Mike Perham Date: Wed, 16 Jan 2013 13:08:10 -0800 Subject: [PATCH] Push to front of queue, not back --- lib/sidekiq/manager.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sidekiq/manager.rb b/lib/sidekiq/manager.rb index 5519543e..f385b12d 100644 --- a/lib/sidekiq/manager.rb +++ b/lib/sidekiq/manager.rb @@ -125,7 +125,7 @@ module Sidekiq # we'll use the object_id to track the worker's data here. processor.terminate if processor.alive? unit_of_work = @in_progress[processor.object_id] - conn.lpush(unit_of_work.queue, unit_of_work.message) + conn.rpush(unit_of_work.queue, unit_of_work.message) end end logger.info("Pushed #{@busy.size} messages back to Redis")