diff options
author | Yuji Yaginuma <yuuji.yaginuma@gmail.com> | 2018-10-05 17:15:43 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-05 17:15:43 +0900 |
commit | 1ceaf7db5013a233bdc671b3f46583c4c1189fe1 (patch) | |
tree | 1b45352aa8b51f10370e220f5016516b4c61054e /railties | |
parent | 9422433e1a875a3f3c3179fff32fb05858604dc6 (diff) | |
parent | 10408938c219610b99896040acfd73df1be783d2 (diff) | |
download | rails-1ceaf7db5013a233bdc671b3f46583c4c1189fe1.tar.gz rails-1ceaf7db5013a233bdc671b3f46583c4c1189fe1.tar.bz2 rails-1ceaf7db5013a233bdc671b3f46583c4c1189fe1.zip |
Merge pull request #34087 from frodsan/application_job_suggestions
Add retry_on/discard suggestions for common cases to ApplicationJob for new apps.
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/app/jobs/application_job.rb.tt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/railties/lib/rails/generators/rails/app/templates/app/jobs/application_job.rb.tt b/railties/lib/rails/generators/rails/app/templates/app/jobs/application_job.rb.tt index a009ace51c..d394c3d106 100644 --- a/railties/lib/rails/generators/rails/app/templates/app/jobs/application_job.rb.tt +++ b/railties/lib/rails/generators/rails/app/templates/app/jobs/application_job.rb.tt @@ -1,2 +1,7 @@ class ApplicationJob < ActiveJob::Base + # Automatically retry jobs that encountered a deadlock + # retry_on ActiveRecord::Deadlocked + + # Most jobs are safe to ignore if the underlying records are no longer available + # discard_on ActiveJob::DeserializationError end |