1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

[ci skip] Fixup changelog. Trim title. Mention benefit.

This commit is contained in:
Kasper Timm Hansen 2018-07-20 21:40:53 +02:00
parent 3a76ead529
commit 7b3ead3b26
No known key found for this signature in database
GPG key ID: 191153215EDA53D8
2 changed files with 8 additions and 5 deletions

View file

@ -1,4 +1,7 @@
* Move `enqueue`/`enqueue_at` notifications to an around callback (was previously an after callback).
* Move `enqueue`/`enqueue_at` notifications to an around callback.
Improves timing accuracy over the old after callback by including
time spent writing to the adapter's IO implementation.
*Zach Kemp*

View file

@ -29,11 +29,11 @@ module ActiveJob
around_enqueue do |job, block|
if job.scheduled_at
ActiveSupport::Notifications.instrument "enqueue_at.active_job",
adapter: job.class.queue_adapter, job: job, &block
ActiveSupport::Notifications.instrument("enqueue_at.active_job",
adapter: job.class.queue_adapter, job: job, &block)
else
ActiveSupport::Notifications.instrument "enqueue.active_job",
adapter: job.class.queue_adapter, job: job, &block
ActiveSupport::Notifications.instrument("enqueue.active_job",
adapter: job.class.queue_adapter, job: job, &block)
end
end
end