Module: ActiveJob::Execution::ClassMethods

Defined in:
activejob/lib/active_job/execution.rb

Overview

Includes methods for executing and performing jobs instantly.

Instance Method Summary collapse

Instance Method Details

#execute(job_data) ⇒ Object

:nodoc:


19
20
21
22
# File 'activejob/lib/active_job/execution.rb', line 19

def execute(job_data) #:nodoc:
  job = deserialize(job_data)
  job.perform_now
end

#perform_now(*args) ⇒ Object

Performs the job immediately.

MyJob.perform_now("mike")

15
16
17
# File 'activejob/lib/active_job/execution.rb', line 15

def perform_now(*args)
  job_or_instantiate(*args).perform_now
end