1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Add retry_jitter to 6.1 new framework defaults

This was added to the defaults for new applications in
e2cdffce3d, but we also need an entry in
the new framework defaults initializer for upgrading applications.
This commit is contained in:
Eugene Kenny 2020-04-19 23:53:20 +01:00
parent d5a3b2e427
commit cb7b1ea8c8
2 changed files with 4 additions and 4 deletions

View file

@ -159,10 +159,6 @@ module Rails
when "6.1" when "6.1"
load_defaults "6.0" load_defaults "6.0"
if respond_to?(:active_job)
active_job.retry_jitter = 0.15
end
if respond_to?(:active_record) if respond_to?(:active_record)
active_record.has_many_inversing = true active_record.has_many_inversing = true
end end
@ -172,6 +168,7 @@ module Rails
end end
if respond_to?(:active_job) if respond_to?(:active_job)
active_job.retry_jitter = 0.15
active_job.skip_after_callbacks_if_terminated = true active_job.skip_after_callbacks_if_terminated = true
end end

View file

@ -12,6 +12,9 @@
# Track Active Storage variants in the database. # Track Active Storage variants in the database.
# Rails.application.config.active_storage.track_variants = true # Rails.application.config.active_storage.track_variants = true
# Apply random variation to the delay when retrying failed jobs.
# Rails.application.config.active_job.retry_jitter = 0.15
# Stop executing `after_enqueue`/`after_perform` callbacks if # Stop executing `after_enqueue`/`after_perform` callbacks if
# `before_enqueue`/`before_perform` respectively halts with `throw :abort`. # `before_enqueue`/`before_perform` respectively halts with `throw :abort`.
# Rails.application.config.active_job.skip_after_callbacks_if_terminated = true # Rails.application.config.active_job.skip_after_callbacks_if_terminated = true