Skip to content

Commit

Permalink
Execute shutdown event async from rest of system shutdown, fixes side…
Browse files Browse the repository at this point in the history
  • Loading branch information
mperham committed Oct 31, 2015
1 parent b0d6069 commit 2022b6b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions Changes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Sidekiq Changes

3.5.3
-----------

- Adjust shutdown event to run in parallel with the rest of system shutdown. [#2635]

3.5.2
-----------

Expand Down
1 change: 0 additions & 1 deletion lib/sidekiq/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ def run
rescue Interrupt
logger.info 'Shutting down'
launcher.stop
fire_event(:shutdown, true)
# Explicitly exit so busy Processor threads can't block
# process shutdown.
exit(0)
Expand Down
1 change: 1 addition & 0 deletions lib/sidekiq/launcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def stop
poller.terminate if poller.alive?

manager.async.stop(:shutdown => true, :timeout => @options[:timeout])
fire_event(:shutdown, true)
@condvar.wait
manager.terminate

Expand Down
2 changes: 1 addition & 1 deletion lib/sidekiq/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Sidekiq
VERSION = "3.5.2"
VERSION = "3.5.3"
end

0 comments on commit 2022b6b

Please sign in to comment.