aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/lib/active_job/execution.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activejob/lib/active_job/execution.rb')
-rw-r--r--activejob/lib/active_job/execution.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activejob/lib/active_job/execution.rb b/activejob/lib/active_job/execution.rb
index d75be376ec..f5a343311f 100644
--- a/activejob/lib/active_job/execution.rb
+++ b/activejob/lib/active_job/execution.rb
@@ -31,11 +31,11 @@ module ActiveJob
#
# MyJob.new(*args).perform_now
def perform_now
+ # Guard against jobs that were persisted before we started counting executions by zeroing out nil counters
+ self.executions = (executions || 0) + 1
+
deserialize_arguments_if_needed
run_callbacks :perform do
- # Guard against jobs that were persisted before we started counting executions by zeroing out nil counters
- self.executions = (executions || 0) + 1
-
perform(*arguments)
end
rescue => exception