diff options
author | zvkemp <zvkemp@gmail.com> | 2018-06-20 12:04:07 -0700 |
---|---|---|
committer | zvkemp <zvkemp@gmail.com> | 2018-07-17 15:05:12 -0700 |
commit | 2a1884bfe5f55370c03573d6685ea6dc4a0f2b61 (patch) | |
tree | 6aba40d69c26b33fda69e22727c10aea61a2ad1b /activejob/lib/active_job | |
parent | af02b9b78f7b735345a891222532d32caf871520 (diff) | |
download | rails-2a1884bfe5f55370c03573d6685ea6dc4a0f2b61.tar.gz rails-2a1884bfe5f55370c03573d6685ea6dc4a0f2b61.tar.bz2 rails-2a1884bfe5f55370c03573d6685ea6dc4a0f2b61.zip |
Wrap ActiveJob::Enqueue in evented ActiveSupport::Notification
Diffstat (limited to 'activejob/lib/active_job')
-rw-r--r-- | activejob/lib/active_job/logging.rb | 6 |
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 |