Add retry_on/discard suggestions for common cases.

This adds the same suggestions added here:
01a69e27a4/activejob/lib/rails/generators/job/templates/application_job.rb

These appear when `app/jobs/application_job.rb` doesn't exist, but not
for new applications.
This commit is contained in:
Francesco Rodríguez 2018-10-05 08:19:56 +02:00
parent 9422433e1a
commit 10408938c2
1 changed files with 5 additions and 0 deletions

View File

@ -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