pub struct PendingJob {
pub id: String,
pub queue: String,
pub job_type: String,
pub payload: Value,
pub options: JobOptions,
pub attempts: u32,
pub state: PendingState,
pub available_at: DateTime<Utc>,
pub reserved_at: Option<DateTime<Utc>>,
pub created_at: DateTime<Utc>,
}Expand description
A job that is not finished yet, as Queue::pending_jobs
lists it.
Fields§
§id: StringThe job id.
queue: StringThe queue it is on.
job_type: StringThe job type (Job::NAME).
payload: ValueThe job value as JSON.
options: JobOptionsThe options it was dispatched with.
attempts: u32Attempts started so far (a running job’s current one included).
state: PendingStateWaiting, delayed or running.
available_at: DateTime<Utc>When it is (or was) available to workers.
reserved_at: Option<DateTime<Utc>>When a worker reserved it, while it runs.
created_at: DateTime<Utc>When it was queued (or last retried from the failed jobs).
Trait Implementations§
Source§impl Clone for PendingJob
impl Clone for PendingJob
Source§impl Debug for PendingJob
impl Debug for PendingJob
Source§impl PartialEq for PendingJob
impl PartialEq for PendingJob
Source§impl Serialize for PendingJob
impl Serialize for PendingJob
impl StructuralPartialEq for PendingJob
Auto Trait Implementations§
impl Forget for PendingJob
impl Freeze for PendingJob
impl RefUnwindSafe for PendingJob
impl Send for PendingJob
impl Sync for PendingJob
impl Unpin for PendingJob
impl UnsafeUnpin for PendingJob
impl UnwindSafe for PendingJob
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ValueFor<Option<T>> for T
impl<T> ValueFor<Option<T>> for T
Source§fn into_value_for(self) -> Option<T>
fn into_value_for(self) -> Option<T>
The value as the column’s type.