1
0
Fork 0
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:
Mike Perham 2013-06-10 15:17:47 -07:00
parent 4e66339f65
commit 84172d512b

View file

@ -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) }