mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
better handle shutdown race
This commit is contained in:
parent
4e66339f65
commit
84172d512b
1 changed files with 4 additions and 2 deletions
|
@ -147,8 +147,10 @@ module Sidekiq
|
|||
|
||||
logger.debug { "Terminating worker threads" }
|
||||
@busy.each do |processor|
|
||||
t = processor.bare_object.actual_work_thread
|
||||
t.raise Shutdown if processor.alive?
|
||||
if processor.alive?
|
||||
t = processor.bare_object.actual_work_thread
|
||||
t.raise Shutdown
|
||||
end
|
||||
end
|
||||
|
||||
after(0) { signal(:shutdown) }
|
||||
|
|
Loading…
Add table
Reference in a new issue