pub struct Retries {
pub max_retries: u32,
pub backoff_initial_interval: Duration,
pub backoff_multiplier: f32,
pub backoff_randomization: f32,
}Expand description
Retries controls the exponential backoff behavior when retrying failed jobs.
Fields§
§max_retries: u32How many times to retry a job before it is considered to have failed permanently.
backoff_initial_interval: DurationHow long to wait before retrying the first time. Defaults to 20 seconds.
backoff_multiplier: f32For each retry after the first, the backoff time will be multiplied by backoff_multiplier ^ current_retry.
Defaults to 2, which will double the backoff time for each retry.
backoff_randomization: f32To avoid pathological cases where multiple jobs are retrying simultaneously, a
random percentage will be added to the backoff time when a job is rescheduled.
backoff_randomization is the maximum percentage to add.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Retries
impl RefUnwindSafe for Retries
impl Send for Retries
impl Sync for Retries
impl Unpin for Retries
impl UnwindSafe for Retries
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more