diff options
Diffstat (limited to 'activejob/lib')
-rw-r--r-- | activejob/lib/rails/generators/job/templates/application_job.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activejob/lib/rails/generators/job/templates/application_job.rb b/activejob/lib/rails/generators/job/templates/application_job.rb index 0b113b950e..f93745a31a 100644 --- a/activejob/lib/rails/generators/job/templates/application_job.rb +++ b/activejob/lib/rails/generators/job/templates/application_job.rb @@ -1,4 +1,9 @@ <% module_namespacing do -%> 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 <% end -%> |