instance method retry_on_handler

Ruby on Rails edge

Since edge Private — implementation detail, not part of the public API

Signature

retry_on_handler(exceptions, wait, attempts, queue, priority, jitter, report, block)

No documentation comment.

Parameters

exceptions req
wait req
attempts req
queue req
priority req
jitter req
report req
block req
Source
# File activejob/lib/active_job/exceptions.rb, line 134
        def retry_on_handler(exceptions, wait, attempts, queue, priority, jitter, report, block)
          proc do |error|
            executions = executions_for(exceptions)
            if attempts == :unlimited || executions < attempts
              ActiveSupport.error_reporter.report(error, source: "application.active_job") if report
              retry_job wait: determine_delay(seconds_or_duration_or_algorithm: wait, executions: executions, error: error, jitter: jitter), queue: queue, priority: priority, error: error
            else
              if block
                instrument :retry_stopped, error: error do
                  block.call(self, error)
                end
                run_after_discard_procs(error)
              else
                instrument :retry_stopped, error: error
                run_after_discard_procs(error)
                raise error
              end
            end
          end
        end

Defined in activejob/lib/active_job/exceptions.rb line 134 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveJob::Exceptions::ClassMethods

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close