diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2016-07-29 15:15:31 -0700 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2016-07-29 15:15:31 -0700 |
commit | 779148d390485dd4e013a9dc7a6608fb1e43b7ef (patch) | |
tree | f569effe5687b3dbf46ac151eb4a2428c33812e3 /activejob/lib | |
parent | f931290e58b2e62b56eca55b1ef45c794886e6cb (diff) | |
download | rails-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')
-rw-r--r-- | activejob/lib/active_job/exceptions.rb | 3 |
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 |