diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2014-05-22 17:08:23 +0200 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2014-05-22 17:08:23 +0200 |
commit | b1793ac0043e815356b2a7a5f35bc9cae91c2385 (patch) | |
tree | 419b23c659e6a850e950dd7d88e7f464f0435729 /lib/active_job/performing.rb | |
parent | 50abad3fe7450f87606d36a196604ff9ad79d3bf (diff) | |
download | rails-b1793ac0043e815356b2a7a5f35bc9cae91c2385.tar.gz rails-b1793ac0043e815356b2a7a5f35bc9cae91c2385.tar.bz2 rails-b1793ac0043e815356b2a7a5f35bc9cae91c2385.zip |
Hide the instrumentation mechanics a little better
Diffstat (limited to 'lib/active_job/performing.rb')
-rw-r--r-- | lib/active_job/performing.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/active_job/performing.rb b/lib/active_job/performing.rb index 6c304a4bed..eca311578d 100644 --- a/lib/active_job/performing.rb +++ b/lib/active_job/performing.rb @@ -3,12 +3,17 @@ require 'active_job/parameters' module ActiveJob module Performing def perform_with_deserialization(*serialized_args) - ActiveSupport::Notifications.instrument "perform.active_job", adapter: self.class.queue_adapter, job: self.class, args: serialized_args + instrument_performing serialized_args perform *Parameters.deserialize(serialized_args) end def perform(*) raise NotImplementedError end + + private + def instrument_performing(args) + ActiveSupport::Notifications.instrument "perform.active_job", adapter: self.class.queue_adapter, job: self.class, args: args + end end end |