Skip to content

Commit

Permalink
bring up to Celluloid 0.17.1.1 compatibility: TaskTerminated is now a…
Browse files Browse the repository at this point in the history
…n Exception but not a StandardError
  • Loading branch information
digitalextremist committed Aug 13, 2015
1 parent 2370aee commit 01e73b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/sidekiq/fetch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def handle_fetch_exception(ex)
@down ||= Time.now
pause
after(0) { fetch }
rescue Task::TerminatedError
rescue Celluloid::TaskTerminated
# 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.
end
Expand Down
2 changes: 1 addition & 1 deletion lib/sidekiq/scheduled.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def initial_wait
# 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(5 * rand)
rescue Celluloid::Task::TerminatedError
rescue Celluloid::TaskTerminated
# Hit Ctrl-C when Sidekiq is finished booting and we have a chance
# to get here.
end
Expand Down

0 comments on commit 01e73b8

Please sign in to comment.