1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

bring up to Celluloid 0.17.1.1 compatibility: TaskTerminated is now an Exception but not a StandardError

This commit is contained in:
//de 2015-08-13 13:04:29 -07:00
parent 2370aeeeb4
commit 01e73b8301
2 changed files with 2 additions and 2 deletions

View file

@ -66,7 +66,7 @@ module Sidekiq
@down ||= Time.now @down ||= Time.now
pause pause
after(0) { fetch } after(0) { fetch }
rescue Task::TerminatedError rescue Celluloid::TaskTerminated
# If redis is down when we try to shut down, all the fetch backlog # If redis is down when we try to shut down, all the fetch backlog
# raises these errors. Haven't been able to figure out what I'm doing wrong. # raises these errors. Haven't been able to figure out what I'm doing wrong.
end end

View file

@ -104,7 +104,7 @@ module Sidekiq
# of workers), and 5 random seconds to ensure they don't all hit Redis at the same time. # of workers), and 5 random seconds to ensure they don't all hit Redis at the same time.
sleep(INITIAL_WAIT) unless Sidekiq.options[:poll_interval_average] sleep(INITIAL_WAIT) unless Sidekiq.options[:poll_interval_average]
sleep(5 * rand) sleep(5 * rand)
rescue Celluloid::Task::TerminatedError rescue Celluloid::TaskTerminated
# Hit Ctrl-C when Sidekiq is finished booting and we have a chance # Hit Ctrl-C when Sidekiq is finished booting and we have a chance
# to get here. # to get here.
end end