FIX: Don't try to dequeue an empty queue.
This commit is contained in:
parent
b8e5989201
commit
1af7d4a894
|
@ -62,6 +62,7 @@ module Scheduler
|
|||
|
||||
# using non_block to match Ruby #deq
|
||||
def do_work(non_block = false)
|
||||
return unless @queue.size > 0
|
||||
db, job, desc = @queue.deq(non_block)
|
||||
db ||= RailsMultisite::ConnectionManagement::DEFAULT
|
||||
|
||||
|
|
Loading…
Reference in New Issue