Class: GenevaDrive::PerformStepJob
- Inherits:
-
ActiveJob::Base
- Object
- ActiveJob::Base
- GenevaDrive::PerformStepJob
- Defined in:
- lib/geneva_drive/jobs/perform_step_job.rb
Overview
ActiveJob that executes a scheduled step execution. This is a thin wrapper that delegates all logic to the Executor.
Idempotency is guaranteed by the Executor, which:
- Acquires locks on both workflow and step execution
- Reloads records after acquiring locks to get fresh state
- Only proceeds if state is still "scheduled"
- Transitions state atomically while holding locks
Instance Method Summary collapse
-
#perform(step_execution_id) ⇒ void
Performs the step execution.
Instance Method Details
#perform(step_execution_id) ⇒ void
This method returns an undefined value.
Performs the step execution.
75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/geneva_drive/jobs/perform_step_job.rb', line 75 def perform(step_execution_id) step_execution = find_step_execution(step_execution_id) unless step_execution logger.warn("StepExecution #{step_execution_id} not found, skipping") return end logger.debug("PerformStepJob starting execution for step #{step_execution_id}") GenevaDrive::Executor.execute!(step_execution, logger: logger) end |