aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/lib/active_job/exceptions.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2016-07-29 15:15:31 -0700
committerDavid Heinemeier Hansson <david@loudthinking.com>2016-07-29 15:15:31 -0700
commit779148d390485dd4e013a9dc7a6608fb1e43b7ef (patch)
treef569effe5687b3dbf46ac151eb4a2428c33812e3 /activejob/lib/active_job/exceptions.rb
parentf931290e58b2e62b56eca55b1ef45c794886e6cb (diff)
downloadrails-779148d390485dd4e013a9dc7a6608fb1e43b7ef.tar.gz
rails-779148d390485dd4e013a9dc7a6608fb1e43b7ef.tar.bz2
rails-779148d390485dd4e013a9dc7a6608fb1e43b7ef.zip
Reraise instead of swallow exceptions that occur beyond the retry attempts
Diffstat (limited to 'activejob/lib/active_job/exceptions.rb')
-rw-r--r--activejob/lib/active_job/exceptions.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activejob/lib/active_job/exceptions.rb b/activejob/lib/active_job/exceptions.rb
index eead8daae3..6b43a8bcb5 100644
--- a/activejob/lib/active_job/exceptions.rb
+++ b/activejob/lib/active_job/exceptions.rb
@@ -32,7 +32,8 @@ module ActiveJob
logger.error "Retrying #{self.class} in #{wait} seconds, due to a #{exception}. The original exception was #{error.cause.inspect}."
retry_job wait: wait, queue: queue, priority: priority
else
- logger.error "Discarded #{self.class} due to a #{exception} which reoccurred on #{executions} attempts. The original exception was #{error.cause.inspect}."
+ logger.error "Stopped retrying #{self.class} due to a #{exception}, which reoccurred on #{executions} attempts. The original exception was #{error.cause.inspect}."
+ raise error
end
end
end