Skip to main content

handle_sop_cancel

Function handle_sop_cancel 

pub async fn handle_sop_cancel(
    __arg0: State<AppState>,
    __arg1: ConnectInfo<SocketAddr>,
    headers: HeaderMap,
    __arg3: Path<(String, String)>,
    body: Bytes,
) -> Response<Body>
Expand description

POST /api/sops/{name}/runs/{run_id}/cancel - operator cancellation for a running SOP. This is a SAFE cancel: the in-flight step keeps running to its own completion and the run stops at the next step boundary, not mid-step. Idempotent and race-safe against normal completion - a run that is already terminal (previously cancelled, or it finished or failed first) is reported as-is with already_terminal: true, never a second cancellation or an error.