diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2016-08-20 17:14:47 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2016-08-20 17:21:14 +0900 |
commit | 88f9a1540a9a6bed81fc38d10692070cca85acf0 (patch) | |
tree | ba10fef81359861adaa262d01421f93c2d6acd35 /activejob | |
parent | 01a8e0c24ea1c24f288c3029e12a9cdf6b56b3bb (diff) | |
download | rails-88f9a1540a9a6bed81fc38d10692070cca85acf0.tar.gz rails-88f9a1540a9a6bed81fc38d10692070cca85acf0.tar.bz2 rails-88f9a1540a9a6bed81fc38d10692070cca85acf0.zip |
correct exception class in `retry_on` example [ci skip]
If the deadlock has occurred `ActiveRecord::Deadlocked` will raise.
Ref: #25107, #26059
Diffstat (limited to 'activejob')
-rw-r--r-- | activejob/lib/active_job/exceptions.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activejob/lib/active_job/exceptions.rb b/activejob/lib/active_job/exceptions.rb index f8d76587ad..d236f03d53 100644 --- a/activejob/lib/active_job/exceptions.rb +++ b/activejob/lib/active_job/exceptions.rb @@ -31,12 +31,12 @@ module ActiveJob # retry_on(YetAnotherCustomAppException) do |job, exception| # ExceptionNotifier.caught(exception) # end - # retry_on ActiveRecord::StatementInvalid, wait: 5.seconds, attempts: 3 + # retry_on ActiveRecord::Deadlocked, wait: 5.seconds, attempts: 3 # retry_on Net::OpenTimeout, wait: :exponentially_longer, attempts: 10 # # def perform(*args) # # Might raise CustomAppException, AnotherCustomAppException, or YetAnotherCustomAppException for something domain specific - # # Might raise ActiveRecord::StatementInvalid when a local db deadlock is detected + # # Might raise ActiveRecord::Deadlocked when a local db deadlock is detected # # Might raise Net::OpenTimeout when the remote service is down # end # end |