Class: RailsWorkflow::OperationExecutionJob

Inherits:
ActiveJob::Base
  • Object
show all
Defined in:
app/jobs/rails_workflow/operation_execution_job.rb

Overview

Rails workflow operation can run in background (if is_background = true). This job is responsible for performing operation in background.

Instance Method Summary collapse

Instance Method Details

#perform(*args) ⇒ Object



8
9
10
11
12
13
# File 'app/jobs/rails_workflow/operation_execution_job.rb', line 8

def perform(*args)
  operation_id = args[0]

  operation = Operation.find operation_id
  operation.execute_in_transaction
end