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:
parent
7748099368
commit
db48ff74bf
3 changed files with 8 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2.6.4
|
||||
-----------
|
||||
|
||||
- Fix crash upon empty queue [#612]
|
||||
|
||||
2.6.3
|
||||
-----------
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
module Sidekiq
|
||||
VERSION = "2.6.3"
|
||||
VERSION = "2.6.4"
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue