From 09889cd4f04058d577523261b174257daaf35974 Mon Sep 17 00:00:00 2001 From: Johan Stenberg Date: Tue, 26 Sep 2023 20:07:18 +0200 Subject: [PATCH 1/2] Adjust method documentation for ActiveJob::Exceptions::ClassMethods#retry_on. The argument does take the initial job execution attempt into account, this is not reflected in the method documentation. --- activejob/lib/active_job/exceptions.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/activejob/lib/active_job/exceptions.rb b/activejob/lib/active_job/exceptions.rb index 1ec5f0acb2c..27f76b4d5cf 100644 --- a/activejob/lib/active_job/exceptions.rb +++ b/activejob/lib/active_job/exceptions.rb @@ -26,8 +26,8 @@ module ActiveJob # as a computing proc that takes the number of executions so far as an argument, or as a symbol reference of # :polynomially_longer, which applies the wait algorithm of ((executions**4) + (Kernel.rand * (executions**4) * jitter)) + 2 # (first wait ~3s, then ~18s, then ~83s, etc) - # * :attempts - Re-enqueues the job the specified number of times (default: 5 attempts) or a symbol reference of :unlimited - # to retry the job until it succeeds + # * :attempts - Enqueues the job the specified number of times (default: 5 attempts) or a symbol reference of :unlimited + # to retry the job until it succeeds. Note that the number of attempts include the original job execution attempt as well # * :queue - Re-enqueues the job on a different queue # * :priority - Re-enqueues the job with a different priority # * :jitter - A random delay of wait time used when calculating backoff. The default is 15% (0.15) which represents the upper bound of possible wait time (expressed as a percentage) From 9ea1e7aa7878fb954576040a3c6083e486cc4934 Mon Sep 17 00:00:00 2001 From: Johan Stenberg Date: Wed, 27 Sep 2023 08:37:12 +0200 Subject: [PATCH 2/2] Update activejob/lib/active_job/exceptions.rb Co-authored-by: Alex Ghiculescu --- activejob/lib/active_job/exceptions.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activejob/lib/active_job/exceptions.rb b/activejob/lib/active_job/exceptions.rb index 27f76b4d5cf..16203f06d44 100644 --- a/activejob/lib/active_job/exceptions.rb +++ b/activejob/lib/active_job/exceptions.rb @@ -27,7 +27,7 @@ module ActiveJob # :polynomially_longer, which applies the wait algorithm of ((executions**4) + (Kernel.rand * (executions**4) * jitter)) + 2 # (first wait ~3s, then ~18s, then ~83s, etc) # * :attempts - Enqueues the job the specified number of times (default: 5 attempts) or a symbol reference of :unlimited - # to retry the job until it succeeds. Note that the number of attempts include the original job execution attempt as well + # to retry the job until it succeeds. The number of attempts includes the original job execution. # * :queue - Re-enqueues the job on a different queue # * :priority - Re-enqueues the job with a different priority # * :jitter - A random delay of wait time used when calculating backoff. The default is 15% (0.15) which represents the upper bound of possible wait time (expressed as a percentage)