Flowdock
method

instrument

Importance_0
v6.1.3.1 - Show latest stable - 0 notes - Class: Instrumentation
instrument(operation, payload = {}, &block) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activejob/lib/active_job/instrumentation.rb, line 19
      def instrument(operation, payload = {}, &block)
        enhanced_block = ->(event_payload) do
          value = block.call if block

          if defined?(@_halted_callback_hook_called) && @_halted_callback_hook_called
            event_payload[:aborted] = true
            @_halted_callback_hook_called = nil
          end

          value
        end

        ActiveSupport::Notifications.instrument            "#{operation}.active_job", payload.merge(adapter: queue_adapter, job: self), &enhanced_block
      end
Register or log in to add new notes.