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

Attempt a bulk requeue for reliable-fetch when shutting down.

I believe there is a case where an #assign will happen after a requeue and cause work to remain in the reliable-fetch queue.
This commit is contained in:
Jonathan Hyman 2013-12-21 07:59:30 -06:00
parent e7043c8651
commit dd805e3fa8

View file

@ -48,6 +48,9 @@ module Sidekiq
manager.async.stop(:shutdown => true, :timeout => @options[:timeout]) manager.async.stop(:shutdown => true, :timeout => @options[:timeout])
manager.wait(:shutdown) manager.wait(:shutdown)
# Requeue everything in case there was a worker who grabbed work while stopped
Sidekiq::Fetcher.strategy.bulk_requeue([], @options)
end end
end end