Class: SolidAgents::ExecuteRunJob

Inherits:
ActiveJob::Base
  • Object
show all
Defined in:
app/jobs/solid_agents/execute_run_job.rb

Instance Method Summary collapse

Instance Method Details

#perform(run_id) ⇒ Object



7
8
9
10
11
12
# File 'app/jobs/solid_agents/execute_run_job.rb', line 7

def perform(run_id)
  run = SolidAgents::Run.find(run_id)
  return if SolidAgents::Workflow.final_stage?(run.stage) || run.failed? || run.succeeded?

  SolidAgents::Runs::Executor.call(run)
end