Prior to this change, exponentially_longer had adverse consequences during system-wide downstream failures. This change adds a random value to the back off calculation in order to prevent the thundering herd problem, whereby all retry jobs would retry at the same time. Specifically this change adds a jitter option to retry_on to enable users of it to scope the randomness calculation to a reasonable amount. The default is 15% of the exponential back off calculation.
1.6 KiB
-
Add an option to disable logging of the job arguments when enqueuing and executing the job.
class SensitiveJob < ApplicationJob self.log_arguments = false def perform(my_sensitive_argument) end end
When dealing with sensitive arguments as password and tokens it is now possible to configure the job to not put the sensitive argument in the logs.
Rafael Mendonça França
-
Changes in
queue_name_prefix
of a job no longer affects all other jobs.Fixes #37084.
Lucas Mansur
-
Allow
Class
andModule
instances to be serialized.Kevin Deisz
-
Log potential matches in
assert_enqueued_with
andassert_performed_with
.Gareth du Plooy
-
Add
at
argument to theperform_enqueued_jobs
test helper.John Crepezzi, Eileen Uchitelle
-
assert_enqueued_with
andassert_performed_with
can now test jobs with relative delay.Vlado Cingel
-
Add jitter to :exponentially_longer
ActiveJob::Exceptions.retry_on with :exponentially_longer now uses a random amount of jitter in order to prevent the thundering herd effect.. Defaults to 15% (represented as 0.15) but overridable via the
:jitter
option when usingretry_on
. Jitter is applied when anInteger
,ActiveSupport::Duration
orexponentially_longer
, is passed to thewait
argument inretry_on
.retry_on(MyError, wait: :exponentially_longer, jitter: 0.30)
Anthony Ross
Please check 6-0-stable for previous changes.