mirror of https://github.com/rails/rails
Merge pull request #49413 from ghiculescu/document-retry-on
Document hierarchy for `retry_on` and `discard_on`
This commit is contained in:
commit
6c9967f85a
|
@ -21,6 +21,9 @@ module ActiveJob
|
|||
# You can also pass a block that'll be invoked if the retry attempts fail for custom logic rather than letting
|
||||
# the exception bubble up. This block is yielded with the job instance as the first and the error instance as the second parameter.
|
||||
#
|
||||
# `retry_on` and `discard_on` handlers are searched from bottom to top, and up the class hierarchy. The handler of the first class for
|
||||
# which <tt>exception.is_a?(klass)</tt> holds true is the one invoked, if any.
|
||||
#
|
||||
# ==== Options
|
||||
# * <tt>:wait</tt> - Re-enqueues the job with a delay specified either in seconds (default: 3 seconds),
|
||||
# as a computing proc that takes the number of executions so far as an argument, or as a symbol reference of
|
||||
|
@ -87,6 +90,9 @@ module ActiveJob
|
|||
#
|
||||
# You can also pass a block that'll be invoked. This block is yielded with the job instance as the first and the error instance as the second parameter.
|
||||
#
|
||||
# `retry_on` and `discard_on` handlers are searched from bottom to top, and up the class hierarchy. The handler of the first class for
|
||||
# which <tt>exception.is_a?(klass)</tt> holds true is the one invoked, if any.
|
||||
#
|
||||
# ==== Example
|
||||
#
|
||||
# class SearchIndexingJob < ActiveJob::Base
|
||||
|
|
Loading…
Reference in New Issue