Module: ActiveJob::Execution::ClassMethods
- Defined in:
- lib/active_job/execution.rb
Overview
Includes methods for executing and performing jobs instantly.
Instance Method Summary collapse
-
#execute(job_data) ⇒ Object
:nodoc:.
-
#perform_now ⇒ Object
Performs the job immediately.
Instance Method Details
#execute(job_data) ⇒ Object
:nodoc:
27 28 29 30 31 32 |
# File 'lib/active_job/execution.rb', line 27 def execute(job_data) # :nodoc: ActiveJob::Callbacks.run_callbacks(:execute) do job = deserialize(job_data) job.perform_now end end |
#perform_now ⇒ Object
Performs the job immediately.
MyJob.perform_now("mike")
23 24 25 |
# File 'lib/active_job/execution.rb', line 23 def perform_now(...) job_or_instantiate(...).perform_now end |