Class: RailsWorkflow::OperationExecutionJob
- Inherits:
-
ActiveJob::Base
- Object
- ActiveJob::Base
- RailsWorkflow::OperationExecutionJob
- 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
#config ⇒ Object
17 18 19 |
# File 'app/jobs/rails_workflow/operation_execution_job.rb', line 17 def config RailsWorkflow.config end |
#operation_runner ⇒ Object
21 22 23 |
# File 'app/jobs/rails_workflow/operation_execution_job.rb', line 21 def operation_runner config.operation_runner end |
#perform(*args) ⇒ Object
10 11 12 13 14 15 |
# File 'app/jobs/rails_workflow/operation_execution_job.rb', line 10 def perform(*args) operation_id = args[0] operation = Operation.find operation_id operation_runner.new(operation).execute_in_transaction end |