未验证 提交 0d7f13a6 编写于 作者: R Ryuta Kamizono 提交者: GitHub

Merge pull request #33012 from bogdanvlviv/fix-discard_on-and-retry_on-doc

Fix name of the second parameter of block executed by `discard_on` and `retry_on`

[ci skip]
......@@ -30,8 +30,8 @@ module ClassMethods
# class RemoteServiceJob < ActiveJob::Base
# retry_on CustomAppException # defaults to 3s wait, 5 attempts
# retry_on AnotherCustomAppException, wait: ->(executions) { executions * 2 }
# retry_on(YetAnotherCustomAppException) do |job, exception|
# ExceptionNotifier.caught(exception)
# retry_on(YetAnotherCustomAppException) do |job, error|
# ExceptionNotifier.caught(error)
# end
# retry_on ActiveRecord::Deadlocked, wait: 5.seconds, attempts: 3
# retry_on Net::OpenTimeout, wait: :exponentially_longer, attempts: 10
......@@ -67,8 +67,8 @@ def retry_on(exception, wait: 3.seconds, attempts: 5, queue: nil, priority: nil)
#
# class SearchIndexingJob < ActiveJob::Base
# discard_on ActiveJob::DeserializationError
# discard_on(CustomAppException) do |job, exception|
# ExceptionNotifier.caught(exception)
# discard_on(CustomAppException) do |job, error|
# ExceptionNotifier.caught(error)
# end
#
# def perform(record)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册