mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
we want to wait for workers and not enqueued jobs
This commit is contained in:
parent
d94774ceec
commit
aff3463957
2 changed files with 4 additions and 2 deletions
|
@ -101,7 +101,8 @@ module Export
|
|||
def wait_for_sidekiq
|
||||
log "Waiting for sidekiq to finish running jobs..."
|
||||
iterations = 0
|
||||
while (running = Sidekiq::Queue.all.map(&:size).sum) > 0
|
||||
workers = Sidekiq::Workers.new
|
||||
while (running = workers.size) > 0
|
||||
log " Waiting for #{running} jobs..."
|
||||
sleep 2
|
||||
iterations += 1
|
||||
|
|
|
@ -128,7 +128,8 @@ module Import
|
|||
def wait_for_sidekiq
|
||||
log "Waiting for sidekiq to finish running jobs..."
|
||||
iterations = 0
|
||||
while (running = Sidekiq::Queue.all.map(&:size).sum) > 0
|
||||
workers = Sidekiq::Workers.new
|
||||
while (running = workers.size) > 0
|
||||
log " Waiting for #{running} jobs..."
|
||||
sleep 5
|
||||
iterations += 1
|
||||
|
|
Loading…
Reference in a new issue