Skip to main content

finalize_failed_run

Function finalize_failed_run 

Source
pub async fn finalize_failed_run(
    store: &Arc<dyn SchedulerStore>,
    run: Run,
    job: &Job,
    status: RunStatus,
    error: impl Into<String>,
    logs: Option<CapturedLogs>,
)
Expand description

Persist a terminal failure/timeout and enqueue a retry when the job policy allows.

Applies optional CapturedLogs to the failed run before update. Does not retry Canceled or Success (callers must only pass RunStatus::Failed or RunStatus::Timeout).