aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/lib/active_job/exceptions.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2016-08-02 12:28:16 -0700
committerDavid Heinemeier Hansson <david@loudthinking.com>2016-08-02 12:28:16 -0700
commit111227c0dfb72b060428063e35d865b62338654a (patch)
tree5af12c47ec4be958ec6bdc4b907b410257e51b39 /activejob/lib/active_job/exceptions.rb
parent3118911335c20b57bee031e4add2a0551c3e3416 (diff)
downloadrails-111227c0dfb72b060428063e35d865b62338654a.tar.gz
rails-111227c0dfb72b060428063e35d865b62338654a.tar.bz2
rails-111227c0dfb72b060428063e35d865b62338654a.zip
Please Rubocup
Diffstat (limited to 'activejob/lib/active_job/exceptions.rb')
-rw-r--r--activejob/lib/active_job/exceptions.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activejob/lib/active_job/exceptions.rb b/activejob/lib/active_job/exceptions.rb
index 33388816e9..5488a86756 100644
--- a/activejob/lib/active_job/exceptions.rb
+++ b/activejob/lib/active_job/exceptions.rb
@@ -15,7 +15,7 @@ module ActiveJob
# the exception bubble up.
#
# ==== Options
- # * <tt>:wait</tt> - Re-enqueues the job with a delay specified either in seconds (default: 3 seconds),
+ # * <tt>:wait</tt> - Re-enqueues the job with a delay specified either in seconds (default: 3 seconds),
# as a computing proc that the number of executions so far as an argument, or as a symbol reference of
# <tt>:exponentially_longer<>, which applies the wait algorithm of <tt>(executions ** 4) + 2</tt>
# (first wait 3s, then 18s, then 83s, etc)
@@ -45,7 +45,7 @@ module ActiveJob
if executions < attempts
logger.error "Retrying #{self.class} in #{wait} seconds, due to a #{exception}. The original exception was #{error.cause.inspect}."
retry_job wait: determine_delay(wait), queue: queue, priority: priority
- else
+ else
if block_given?
yield exception
else
@@ -112,6 +112,6 @@ module ActiveJob
algorithm = seconds_or_algorithm
algorithm.call(executions)
end
- end
+ end
end
end