[−][src]Struct dbq::Job
Specification and status of a job
Fields
id: u64
Unique identifier for the job within the queue
queue: String
Queue the job is part of
class: String
Type of job
args: Value
JSON arguments to the job
max_attempts: u32
Total number of times the job may be run before being moved to "dead letters" storage and no longer retried
created_at: DateTime<Utc>
Instant when the job was created
run_next_at: Option<DateTime<Utc>>
Earliest instant when the job may be run.
last_failed_at: Option<DateTime<Utc>>
Instant when the last run failed. This only ever has a non-None
value
when the job has been run and failed previously.
last_error: Option<String>
Error message from last failed run. This only ever has a non-None
value when the job has been run and failed previously.
error_count: u32
Number of times the job has been run and failed
Methods
impl Job
[src]
pub fn final_attempt(&self) -> bool
[src]
If true, the job will not be retried after the current attempt and will be moved to "dead letters" storage if it fails. If false, the job will be retried on failure.
pub fn failed(&self) -> bool
[src]
If true, the job has been attempted at least max_attempts
times and
is no longe being retried. If false, the job may have succeeded or will
contintue to be retried on failure
Trait Implementations
impl Clone for Job
[src]
fn clone(&self) -> Job
[src]
default fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Job
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same for T
type Output = T
Should always be Self