pub trait StepRunner: Send + Sync {
// Required method
fn run_step(
&self,
step: &Step,
) -> impl Future<Output = Result<StepOutcome, StepError>> + Send;
}Expand description
User-implemented logic that advances a single workflow step.
Implementations must be idempotent for the same (run_id, step_number):
Taquba is at-least-once, so a step can be claimed and processed more than
once if a lease expires before the worker acks. Returning the same
StepOutcome for the same input is the easiest way to satisfy this.
Required Methods§
Sourcefn run_step(
&self,
step: &Step,
) -> impl Future<Output = Result<StepOutcome, StepError>> + Send
fn run_step( &self, step: &Step, ) -> impl Future<Output = Result<StepOutcome, StepError>> + Send
Process a single step of a workflow run. Return StepOutcome::Continue
to enqueue the next step, StepOutcome::Succeed to finish the run
successfully, StepOutcome::Fail to terminate the run as Failed by
runner verdict, StepOutcome::Cancel to terminate the run as
Cancelled by runner verdict, or Err(StepError) to retry /
dead-letter on infrastructure errors.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.