Skip to main content

evaluate_state_transition

Function evaluate_state_transition 

Source
pub fn evaluate_state_transition(
    from: RunState,
    to: RunState,
    ctx: KeyLifecycleContext<'_>,
) -> LifecycleResult
Expand description

Determines the appropriate key lifecycle action based on a state transition.

When a run transitions to Running, the concurrency key should be acquired. When a run transitions to a terminal state (Completed, Failed, Canceled), the concurrency key should be released.

The hold_policy parameter controls behavior when transitioning from Running to RetryWait: