aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/CHANGELOG.md
diff options
context:
space:
mode:
authoryuuji.yaginuma <yuuji.yaginuma@gmail.com>2016-10-09 08:46:31 +0900
committeryuuji.yaginuma <yuuji.yaginuma@gmail.com>2016-10-09 08:46:31 +0900
commitbe199dfae2c5d405492ced877b63013c4789e275 (patch)
tree077bf5d208dfbb22b0d87bc3a95340ea2bf1f2bc /activejob/CHANGELOG.md
parentfb4dc3224508ba55320ecc61bf7da5f1282d6873 (diff)
downloadrails-be199dfae2c5d405492ced877b63013c4789e275.tar.gz
rails-be199dfae2c5d405492ced877b63013c4789e275.tar.bz2
rails-be199dfae2c5d405492ced877b63013c4789e275.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/CHANGELOG.md')
-rw-r--r--activejob/CHANGELOG.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/activejob/CHANGELOG.md b/activejob/CHANGELOG.md
index 9bf397af14..ef62b2136b 100644
--- a/activejob/CHANGELOG.md
+++ b/activejob/CHANGELOG.md
@@ -16,13 +16,13 @@
class RemoteServiceJob < ActiveJob::Base
retry_on CustomAppException # defaults to 3s wait, 5 attempts
retry_on AnotherCustomAppException, wait: ->(executions) { executions * 2 }
- 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
discard_on ActiveJob::DeserializationError
def perform(*args)
# Might raise CustomAppException or AnotherCustomAppException 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