aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/lib/active_job/logging.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activejob/lib/active_job/logging.rb')
-rw-r--r--activejob/lib/active_job/logging.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activejob/lib/active_job/logging.rb b/activejob/lib/active_job/logging.rb
index 3312857ac7..d17c772f30 100644
--- a/activejob/lib/active_job/logging.rb
+++ b/activejob/lib/active_job/logging.rb
@@ -27,13 +27,13 @@ module ActiveJob
end
end
- after_enqueue do |job|
+ around_enqueue do |job, block|
if job.scheduled_at
ActiveSupport::Notifications.instrument "enqueue_at.active_job",
- adapter: job.class.queue_adapter, job: job
+ adapter: job.class.queue_adapter, job: job, &block
else
ActiveSupport::Notifications.instrument "enqueue.active_job",
- adapter: job.class.queue_adapter, job: job
+ adapter: job.class.queue_adapter, job: job, &block
end
end
end