Skip to main content

retry_external

Function retry_external 

Source
pub async fn retry_external(
    pool: &PgPool,
    callback_id: Uuid,
    run_lease: Option<i64>,
) -> Result<JobRow, AwaError>
Expand description

Retry a waiting job via external callback.

Resets to available with attempt = 0. The handler must be idempotent with respect to the external call — a retry re-executes from scratch.

Only accepts waiting_external state — unlike complete/fail which are terminal transitions, retry puts the job back to available. Allowing retry from running would risk concurrent dispatch if the original handler hasn’t finished yet.