Skip to content

Commit 4cd3b64

Browse files
committed
Fix: ActiveJob::Exceptions.discard_on report option should default to false to preserve existing behaviour.
1 parent b721c62 commit 4cd3b64

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

activejob/lib/active_job/exceptions.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def retry_on(*exceptions, wait: 3.seconds, attempts: 5, queue: nil, priority: ni
8585
# Discard the job with no attempts to retry, if the exception is raised. This is useful when the subject of the job,
8686
# like an Active Record, is no longer available, and the job is thus no longer relevant.
8787
#
88-
# Passing the <tt>:report</tt> option reporter the error through the error reporter before discarding the job.
88+
# Passing the <tt>:report</tt> option reports the error through the error reporter before discarding the job.
8989
#
9090
# 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.
9191
#
@@ -106,7 +106,7 @@ def retry_on(*exceptions, wait: 3.seconds, attempts: 5, queue: nil, priority: ni
106106
# # Might raise CustomAppException for something domain specific
107107
# end
108108
# end
109-
def discard_on(*exceptions, report: true)
109+
def discard_on(*exceptions, report: false)
110110
rescue_from(*exceptions) do |error|
111111
instrument :discard, error: error do
112112
ActiveSupport.error_reporter.report(error, source: "application.active_job") if report

0 commit comments

Comments
 (0)