method

perform_now

Importance_1
v7.1.3.2 - Show latest stable - 0 notes - Class: Execution
perform_now() public

Performs the job immediately. The job is not sent to the queuing adapter but directly executed by blocking the execution of others until it’s finished. perform_now returns the value of your job’s perform method.

class MyJob < ActiveJob::Base
  def perform
    "Hello World!"
  end
end

puts MyJob.new(*args).perform_now # => "Hello World!"
Show source
Register or log in to add new notes.