Skip to content

Commit

Permalink
Remove async on termination of fetcher/poller, leave everything else …
Browse files Browse the repository at this point in the history
…the same.
  • Loading branch information
jonhyman committed Jan 10, 2014
1 parent 8d1eb10 commit e0c20d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/sidekiq/launcher.rb
Expand Up @@ -43,12 +43,12 @@ def stop
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
Expand Down

0 comments on commit e0c20d1

Please sign in to comment.