diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2018-07-20 21:32:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-20 21:32:40 +0200 |
commit | 3a76ead5291994e022153768915909c058733e41 (patch) | |
tree | 69001a8af7d0f67c3b883f6fe07fd1f6081d8e11 /activejob/lib/active_job | |
parent | ba78b1fd4395ae688661bc477abecd5b31c66f2c (diff) | |
parent | 2a1884bfe5f55370c03573d6685ea6dc4a0f2b61 (diff) | |
download | rails-3a76ead5291994e022153768915909c058733e41.tar.gz rails-3a76ead5291994e022153768915909c058733e41.tar.bz2 rails-3a76ead5291994e022153768915909c058733e41.zip |
Merge pull request #33171 from zvkemp/active-job-asn-wrap-enqueue
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 |