123456789_123456789_123456789_123456789_123456789_

Module: ActiveJob::Callbacks

Relationships & Source Files
Namespace Children
Modules:
Extension / Inclusion / Inheritance Descendants
Included In:
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Defined in: activejob/lib/active_job/callbacks.rb

Overview

Active Job provides hooks during the life cycle of a job. Callbacks allow you to trigger logic during this cycle. Available callbacks are:

  • before_enqueue

  • around_enqueue

  • after_enqueue

  • before_perform

  • around_perform

  • after_perform

Constant Summary

::ActiveSupport::Callbacks - Included

CALLBACK_FILTER_TYPES

::ActiveSupport::Callbacks - Attributes & Methods

Class Method Summary

::ActiveSupport::DescendantsTracker - self

::ActiveSupport::Callbacks - Extended

run_callbacks

Runs the callbacks for the given event.

halted_callback_hook

A hook invoked every time a before callback is halted.

::ActiveSupport::Concern - Extended

class_methods

Define class methods from given block.

included

Evaluate given block in context of base class, so that you can write class macros here.

prepended

Evaluate given block in context of base class, so that you can write class macros here.

append_features, prepend_features

Instance Method Summary

::ActiveSupport::Callbacks - Included

#run_callbacks

Runs the callbacks for the given event.

#halted_callback_hook

A hook invoked every time a before callback is halted.

DSL Calls

included

[ GitHub ]


27
28
29
30
# File 'activejob/lib/active_job/callbacks.rb', line 27

included do
  define_callbacks :perform, skip_after_callbacks_if_terminated: true
  define_callbacks :enqueue, skip_after_callbacks_if_terminated: true
end

Class Attribute Details

.__callbacks (rw)

[ GitHub ]

  
# File 'activesupport/lib/active_support/callbacks.rb', line 69

class_attribute :__callbacks, instance_writer: false, instance_predicate: false, default: {}

Instance Attribute Details

#__callbacks (readonly)

[ GitHub ]

  
# File 'activesupport/lib/active_support/callbacks.rb', line 69

class_attribute :__callbacks, instance_writer: false, instance_predicate: false, default: {}