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

Remove async on termination of fetcher/poller, leave everything else the same.

This commit is contained in:
Jonathan Hyman 2014-01-10 14:58:53 -05:00
parent 8d1eb10f28
commit e0c20d1612

View file

@ -43,12 +43,12 @@ module Sidekiq
watchdog('Launcher#stop') do
@done = true
Sidekiq::Fetcher.done!
manager.async.stop(:shutdown => true, :timeout => @options[:timeout])
fetcher.terminate if fetcher.alive?
poller.terminate if poller.alive?
manager.async.stop(:shutdown => true, :timeout => @options[:timeout])
manager.wait(:shutdown)
# Requeue everything in case there was a worker who grabbed work while stopped
Sidekiq::Fetcher.strategy.bulk_requeue([], @options)
end