提交 88f9a154 编写于 作者: Y yuuji.yaginuma

correct exception class in `retry_on` example [ci skip]

If the deadlock has occurred `ActiveRecord::Deadlocked` will raise.
Ref: #25107, #26059
上级 01a8e0c2
......@@ -31,12 +31,12 @@ module ClassMethods
# retry_on(YetAnotherCustomAppException) do |job, exception|
# ExceptionNotifier.caught(exception)
# end
# retry_on ActiveRecord::StatementInvalid, wait: 5.seconds, attempts: 3
# retry_on ActiveRecord::Deadlocked, wait: 5.seconds, attempts: 3
# retry_on Net::OpenTimeout, wait: :exponentially_longer, attempts: 10
#
# def perform(*args)
# # Might raise CustomAppException, AnotherCustomAppException, or YetAnotherCustomAppException for something domain specific
# # Might raise ActiveRecord::StatementInvalid when a local db deadlock is detected
# # Might raise ActiveRecord::Deadlocked when a local db deadlock is detected
# # Might raise Net::OpenTimeout when the remote service is down
# end
# end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册