pub enum JobResult {
Success,
Failed,
RetryAt(DateTime<Utc>),
RescheduleAt(DateTime<Utc>),
HandlerMissing,
Critical,
Cancel,
Unprocessable,
InternalError,
}Expand description
Result of a job execution, should be returned by the job handler.
Variants§
Success
Job processed successfully.
Failed
Job failed, subject to retry (with BackoffStrategy).
RetryAt(DateTime<Utc>)
Retry (i.e. attempt count incremented) at a specific time. IMPORTANT: Job cannot be retried sooner than the backoff strategy allows
RescheduleAt(DateTime<Utc>)
Reschedule to specific time. Attempt it NOT consumed. Use with caution. Queue’s max_reprocess_count is a safety measure to prevent infinite rescheduling.
HandlerMissing
Handler not found for the job type, status changes to unprocessable.
Critical
Critical failure, job is not retried.
Cancel
Cancel the job (i.e. do not retry anymore), status changes to cancelled.
Unprocessable
Handler can’t process the job (e.g. deserialization failures), status changes to unprocessable.
InternalError
Internal error, same as Failed but looks nicer when handler encountered recoverable error. Attempt is consumed.
Auto Trait Implementations§
impl Freeze for JobResult
impl RefUnwindSafe for JobResult
impl Send for JobResult
impl Sync for JobResult
impl Unpin for JobResult
impl UnsafeUnpin for JobResult
impl UnwindSafe for JobResult
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
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>
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>
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