pub enum JobStrategyError {
CancelJob,
TryAfter(Duration),
Retry,
MarkCompleted,
}Expand description
When aquiring a permit from a JobStrategy, permit giver can return an error to impact on the job’s processing
Variants§
CancelJob
The job shouldn’t be processed, mark as canceled (e.g. feature flags, resource no longer available, deprecated jobs etc.)
TryAfter(Duration)
The job should be tried again after a delay (e.g. resource temporarily unavailable, renewable limits, etc. )
Retry
Retry with backoff strategy (consumes attempt)
MarkCompleted
Mark job as completed without processing, e.g. when seasonal job backed off far into future is no longer relevant, but shouldn’t be sent to dead-letter queue
Trait Implementations§
Auto Trait Implementations§
impl Freeze for JobStrategyError
impl RefUnwindSafe for JobStrategyError
impl Send for JobStrategyError
impl Sync for JobStrategyError
impl Unpin for JobStrategyError
impl UnsafeUnpin for JobStrategyError
impl UnwindSafe for JobStrategyError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more