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

Fix empty queue crash, fixes #612

This commit is contained in:
Mike Perham 2013-01-08 08:43:34 -08:00
parent 7748099368
commit db48ff74bf
3 changed files with 8 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2.6.4
-----------
- Fix crash upon empty queue [#612]
2.6.3
-----------

View file

@ -67,7 +67,8 @@ module Sidekiq
end
def retrieve_work
UnitOfWork.new(*Sidekiq.redis { |conn| conn.brpop(*queues_cmd) })
work = Sidekiq.redis { |conn| conn.brpop(*queues_cmd) }
UnitOfWork.new(*work) if work
end
UnitOfWork = Struct.new(:queue, :message) do

View file

@ -1,3 +1,3 @@
module Sidekiq
VERSION = "2.6.3"
VERSION = "2.6.4"
end