Skip to main content

backoff_delay

Function backoff_delay 

Source
pub fn backoff_delay(
    base: Duration,
    attempts: i32,
    max_attempts: i32,
) -> Duration
Available on crate feature outbox only.
Expand description

Compute the retry delay for a row that has already failed attempts times.

Exponential (base * 2^attempts) capped at one hour; once max_attempts is reached the row is parked ~30 days out for manual inspection.