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
NOTE: Calling the same callback multiple times will overwrite previous callback definitions.
Constant Summary
::ActiveSupport::Callbacks
- Included
::ActiveSupport::Callbacks
- Attributes & Methods
- .__callbacks rw
- #__callbacks readonly
- .__callbacks? ⇒ Boolean rw
- #__callbacks? ⇒ Boolean readonly
Class Method Summary
::ActiveSupport::DescendantsTracker
- self
clear, descendants, direct_descendants, | |
store_inherited | This is the only method that is not thread safe, but is only ever called during the eager loading phase. |
::ActiveSupport::Callbacks
- Extended
run_callbacks | Runs the callbacks for the given event. |
::ActiveSupport::Concern
- Extended
Instance Method Summary
::ActiveSupport::Callbacks
- Included
#run_callbacks | Runs the callbacks for the given event. |
DSL Calls
included
[ GitHub ]29 30 31 32
# File 'activejob/lib/active_job/callbacks.rb', line 29
included do define_callbacks :perform define_callbacks :enqueue end
Class Attribute Details
.__callbacks (rw)
[ GitHub ]# File 'activesupport/lib/active_support/callbacks.rb', line 67
class_attribute :__callbacks, instance_writer: false, default: {}
.__callbacks? ⇒ Boolean
(rw)
[ GitHub ]
# File 'activesupport/lib/active_support/callbacks.rb', line 67
class_attribute :__callbacks, instance_writer: false, default: {}
Instance Attribute Details
#__callbacks (readonly)
[ GitHub ]# File 'activesupport/lib/active_support/callbacks.rb', line 67
class_attribute :__callbacks, instance_writer: false, default: {}
#__callbacks? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'activesupport/lib/active_support/callbacks.rb', line 67
class_attribute :__callbacks, instance_writer: false, default: {}