mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 07:11:34 +08:00
FIX: Don't try to dequeue an empty queue.
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user