aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2018-07-20 21:40:53 +0200
committerKasper Timm Hansen <kaspth@gmail.com>2018-07-20 21:40:53 +0200
commit7b3ead3b26682ee331e0e67eb4e3962742f9aa5e (patch)
tree656df211b98d7e03ffbdf61d602ada6d0a75d377
parent3a76ead5291994e022153768915909c058733e41 (diff)
downloadrails-7b3ead3b26682ee331e0e67eb4e3962742f9aa5e.tar.gz
rails-7b3ead3b26682ee331e0e67eb4e3962742f9aa5e.tar.bz2
rails-7b3ead3b26682ee331e0e67eb4e3962742f9aa5e.zip
[ci skip] Fixup changelog. Trim title. Mention benefit.
-rw-r--r--activejob/CHANGELOG.md5
-rw-r--r--activejob/lib/active_job/logging.rb8
2 files changed, 8 insertions, 5 deletions
diff --git a/activejob/CHANGELOG.md b/activejob/CHANGELOG.md
index 9e3c91fdfc..8526741383 100644
--- a/activejob/CHANGELOG.md
+++ b/activejob/CHANGELOG.md
@@ -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*
diff --git a/activejob/lib/active_job/logging.rb b/activejob/lib/active_job/logging.rb
index d17c772f30..9ffd60ad53 100644
--- a/activejob/lib/active_job/logging.rb
+++ b/activejob/lib/active_job/logging.rb
@@ -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