aboutsummaryrefslogtreecommitdiffstats
path: root/activejob
diff options
context:
space:
mode:
authorEileen M. Uchitelle <eileencodes@users.noreply.github.com>2018-09-09 15:22:18 -0400
committerGitHub <noreply@github.com>2018-09-09 15:22:18 -0400
commit12b32d804996c6bb3d215a22762c0c1a27f223d3 (patch)
treecd910cb1d78733d5783eb957d51da31d7bf8ef40 /activejob
parent101096e5421d93b02d9df284385cf305db81cd1f (diff)
parent86aa8f8c5631f77ed9a208e5107003c01512133e (diff)
downloadrails-12b32d804996c6bb3d215a22762c0c1a27f223d3.tar.gz
rails-12b32d804996c6bb3d215a22762c0c1a27f223d3.tar.bz2
rails-12b32d804996c6bb3d215a22762c0c1a27f223d3.zip
Merge pull request #33826 from tgturner/activejob-retry-attempts
retry_on argument `attempts` clarification
Diffstat (limited to 'activejob')
-rw-r--r--activejob/lib/active_job/exceptions.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/activejob/lib/active_job/exceptions.rb b/activejob/lib/active_job/exceptions.rb
index 9a14c33d80..d8384c81b6 100644
--- a/activejob/lib/active_job/exceptions.rb
+++ b/activejob/lib/active_job/exceptions.rb
@@ -9,6 +9,7 @@ module ActiveJob
module ClassMethods
# Catch the exception and reschedule job for re-execution after so many seconds, for a specific number of attempts.
+ # The number of attempts includes the total executions of a job, not just the retried executions.
# If the exception keeps getting raised beyond the specified number of attempts, the exception is allowed to
# bubble up to the underlying queuing system, which may have its own retry mechanism or place it in a
# holding queue for inspection.
@@ -21,7 +22,8 @@ module ActiveJob
# as a computing proc that the number of executions so far as an argument, or as a symbol reference of
# <tt>:exponentially_longer</tt>, which applies the wait algorithm of <tt>(executions ** 4) + 2</tt>
# (first wait 3s, then 18s, then 83s, etc)
- # * <tt>:attempts</tt> - Re-enqueues the job the specified number of times (default: 5 attempts)
+ # * <tt>:attempts</tt> - Re-enqueues the job the specified number of times (default: 5 attempts),
+ # attempts here refers to the total number of times the job is executed, not just retried executions
# * <tt>:queue</tt> - Re-enqueues the job on a different queue
# * <tt>:priority</tt> - Re-enqueues the job with a different priority
#