mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Terminate the poller and the fetcher synchronously.
This commit is contained in:
parent
6cd4e6a96e
commit
8d1eb10f28
1 changed files with 4 additions and 4 deletions
|
@ -43,12 +43,12 @@ module Sidekiq
|
|||
watchdog('Launcher#stop') do
|
||||
@done = true
|
||||
Sidekiq::Fetcher.done!
|
||||
fetcher.async.terminate if fetcher.alive?
|
||||
poller.async.terminate if poller.alive?
|
||||
|
||||
manager.async.stop(:shutdown => true, :timeout => @options[:timeout])
|
||||
manager.wait(:shutdown)
|
||||
|
||||
fetcher.terminate if fetcher.alive?
|
||||
poller.terminate if poller.alive?
|
||||
|
||||
manager.wait(:shutdown)
|
||||
# Requeue everything in case there was a worker who grabbed work while stopped
|
||||
Sidekiq::Fetcher.strategy.bulk_requeue([], @options)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue