Skip to main content

WorkQueueRecord

Enum WorkQueueRecord 

Source
pub enum WorkQueueRecord<T> {
Show 13 variants WorkAdmitted { record_seq: u64, queue_id: String, work_id: String, payload: T, message_bus: WorkQueueMessageBusRef, priority: Option<i64>, tags: Vec<String>, requirements: Vec<String>, not_before_ms: Option<u64>, deadline_ms: Option<u64>, recorded_at_ms: u64, }, AdmissionDeduped { record_seq: u64, queue_id: String, work_id: String, message_bus: WorkQueueMessageBusRef, reason: String, existing_work_id: String, recorded_at_ms: u64, }, WorkScheduled { record_seq: u64, queue_id: String, work_id: String, command_id: String, schedule_id: Option<String>, not_before_ms: u64, deadline_ms: Option<u64>, reason: Option<String>, recorded_at_ms: u64, }, WorkClaimed { record_seq: u64, queue_id: String, work_id: String, command_id: String, lease_id: String, attempt: u32, worker_id: String, claimed_at_ms: u64, lease_expires_at_ms: u64, }, LeaseRenewed { record_seq: u64, queue_id: String, work_id: String, command_id: String, lease_id: String, attempt: u32, worker_id: String, previous_lease_expires_at_ms: u64, lease_expires_at_ms: u64, renewed_at_ms: u64, }, WorkReleased { record_seq: u64, queue_id: String, work_id: String, command_id: String, lease_id: String, attempt: u32, worker_id: String, released_at_ms: u64, reason: Option<String>, }, LeaseExpired { record_seq: u64, queue_id: String, work_id: String, command_id: Option<String>, lease_id: String, attempt: u32, worker_id: String, lease_expires_at_ms: u64, expired_at_ms: u64, }, AttemptCompleted { record_seq: u64, queue_id: String, work_id: String, command_id: String, lease_id: String, attempt: u32, worker_id: String, result: Option<String>, recorded_at_ms: u64, }, WorkCompleted { record_seq: u64, queue_id: String, work_id: String, command_id: String, lease_id: String, attempt: u32, worker_id: String, result: Option<String>, recorded_at_ms: u64, }, AttemptFailed { record_seq: u64, queue_id: String, work_id: String, command_id: String, lease_id: String, attempt: u32, worker_id: String, error: Option<String>, retryable: Option<bool>, recorded_at_ms: u64, }, RetryScheduled { record_seq: u64, queue_id: String, work_id: String, command_id: String, retry_at_ms: u64, delay_ms: u64, reason: Option<String>, recorded_at_ms: u64, }, WorkDeadLettered { record_seq: u64, queue_id: String, work_id: String, command_id: String, reason: String, exhausted_attempts: Option<u32>, recorded_at_ms: u64, }, WorkCanceled { record_seq: u64, queue_id: String, work_id: String, command_id: String, reason: Option<String>, canceled_at_ms: u64, canceled_lease_id: Option<String>, attempt: Option<u32>, },
}
Expand description

WorkQueueRecord variants.

Variants§

§

WorkAdmitted

WorkAdmitted variant.

Fields

§record_seq: u64

record_seq field for record seq.

§queue_id: String

queue_id field for queue id.

§work_id: String

work_id field for work id.

§payload: T

payload field for payload.

§message_bus: WorkQueueMessageBusRef

message_bus field for message bus.

§priority: Option<i64>

priority field for priority.

§tags: Vec<String>

tags field for tags.

§requirements: Vec<String>

requirements field for requirements.

§not_before_ms: Option<u64>

not_before_ms field for not before ms.

§deadline_ms: Option<u64>

deadline_ms field for deadline ms.

§recorded_at_ms: u64

recorded_at_ms field for recorded at ms.

§

AdmissionDeduped

AdmissionDeduped variant.

Fields

§record_seq: u64

record_seq field for record seq.

§queue_id: String

queue_id field for queue id.

§work_id: String

work_id field for work id.

§message_bus: WorkQueueMessageBusRef

message_bus field for message bus.

§reason: String

reason field for reason.

§existing_work_id: String

existing_work_id field for existing work id.

§recorded_at_ms: u64

recorded_at_ms field for recorded at ms.

§

WorkScheduled

WorkScheduled variant.

Fields

§record_seq: u64

record_seq field for record seq.

§queue_id: String

queue_id field for queue id.

§work_id: String

work_id field for work id.

§command_id: String

command_id field for command id.

§schedule_id: Option<String>

schedule_id field for schedule id.

§not_before_ms: u64

not_before_ms field for not before ms.

§deadline_ms: Option<u64>

deadline_ms field for deadline ms.

§reason: Option<String>

reason field for reason.

§recorded_at_ms: u64

recorded_at_ms field for recorded at ms.

§

WorkClaimed

WorkClaimed variant.

Fields

§record_seq: u64

record_seq field for record seq.

§queue_id: String

queue_id field for queue id.

§work_id: String

work_id field for work id.

§command_id: String

command_id field for command id.

§lease_id: String

lease_id field for lease id.

§attempt: u32

attempt field for attempt.

§worker_id: String

worker_id field for worker id.

§claimed_at_ms: u64

claimed_at_ms field for claimed at ms.

§lease_expires_at_ms: u64

lease_expires_at_ms field for lease expires at ms.

§

LeaseRenewed

LeaseRenewed variant.

Fields

§record_seq: u64

record_seq field for record seq.

§queue_id: String

queue_id field for queue id.

§work_id: String

work_id field for work id.

§command_id: String

command_id field for command id.

§lease_id: String

lease_id field for lease id.

§attempt: u32

attempt field for attempt.

§worker_id: String

worker_id field for worker id.

§previous_lease_expires_at_ms: u64

previous_lease_expires_at_ms field for previous lease expires at ms.

§lease_expires_at_ms: u64

lease_expires_at_ms field for lease expires at ms.

§renewed_at_ms: u64

renewed_at_ms field for renewed at ms.

§

WorkReleased

WorkReleased variant.

Fields

§record_seq: u64

record_seq field for record seq.

§queue_id: String

queue_id field for queue id.

§work_id: String

work_id field for work id.

§command_id: String

command_id field for command id.

§lease_id: String

lease_id field for lease id.

§attempt: u32

attempt field for attempt.

§worker_id: String

worker_id field for worker id.

§released_at_ms: u64

released_at_ms field for released at ms.

§reason: Option<String>

reason field for reason.

§

LeaseExpired

LeaseExpired variant.

Fields

§record_seq: u64

record_seq field for record seq.

§queue_id: String

queue_id field for queue id.

§work_id: String

work_id field for work id.

§command_id: Option<String>

command_id field for command id.

§lease_id: String

lease_id field for lease id.

§attempt: u32

attempt field for attempt.

§worker_id: String

worker_id field for worker id.

§lease_expires_at_ms: u64

lease_expires_at_ms field for lease expires at ms.

§expired_at_ms: u64

expired_at_ms field for expired at ms.

§

AttemptCompleted

AttemptCompleted variant.

Fields

§record_seq: u64

record_seq field for record seq.

§queue_id: String

queue_id field for queue id.

§work_id: String

work_id field for work id.

§command_id: String

command_id field for command id.

§lease_id: String

lease_id field for lease id.

§attempt: u32

attempt field for attempt.

§worker_id: String

worker_id field for worker id.

§result: Option<String>

result field for result.

§recorded_at_ms: u64

recorded_at_ms field for recorded at ms.

§

WorkCompleted

WorkCompleted variant.

Fields

§record_seq: u64

record_seq field for record seq.

§queue_id: String

queue_id field for queue id.

§work_id: String

work_id field for work id.

§command_id: String

command_id field for command id.

§lease_id: String

lease_id field for lease id.

§attempt: u32

attempt field for attempt.

§worker_id: String

worker_id field for worker id.

§result: Option<String>

result field for result.

§recorded_at_ms: u64

recorded_at_ms field for recorded at ms.

§

AttemptFailed

AttemptFailed variant.

Fields

§record_seq: u64

record_seq field for record seq.

§queue_id: String

queue_id field for queue id.

§work_id: String

work_id field for work id.

§command_id: String

command_id field for command id.

§lease_id: String

lease_id field for lease id.

§attempt: u32

attempt field for attempt.

§worker_id: String

worker_id field for worker id.

§error: Option<String>

error field for error.

§retryable: Option<bool>

retryable field for retryable.

§recorded_at_ms: u64

recorded_at_ms field for recorded at ms.

§

RetryScheduled

RetryScheduled variant.

Fields

§record_seq: u64

record_seq field for record seq.

§queue_id: String

queue_id field for queue id.

§work_id: String

work_id field for work id.

§command_id: String

command_id field for command id.

§retry_at_ms: u64

retry_at_ms field for retry at ms.

§delay_ms: u64

delay_ms field for delay ms.

§reason: Option<String>

reason field for reason.

§recorded_at_ms: u64

recorded_at_ms field for recorded at ms.

§

WorkDeadLettered

WorkDeadLettered variant.

Fields

§record_seq: u64

record_seq field for record seq.

§queue_id: String

queue_id field for queue id.

§work_id: String

work_id field for work id.

§command_id: String

command_id field for command id.

§reason: String

reason field for reason.

§exhausted_attempts: Option<u32>

exhausted_attempts field for exhausted attempts.

§recorded_at_ms: u64

recorded_at_ms field for recorded at ms.

§

WorkCanceled

WorkCanceled variant.

Fields

§record_seq: u64

record_seq field for record seq.

§queue_id: String

queue_id field for queue id.

§work_id: String

work_id field for work id.

§command_id: String

command_id field for command id.

§reason: Option<String>

reason field for reason.

§canceled_at_ms: u64

canceled_at_ms field for canceled at ms.

§canceled_lease_id: Option<String>

canceled_lease_id field for canceled lease id.

§attempt: Option<u32>

attempt field for attempt.

Implementations§

Source§

impl<T> WorkQueueRecord<T>

Source

pub fn record_seq(&self) -> u64

Updates or reads record_seq.

Source

pub fn work_id(&self) -> &str

Updates or reads work_id.

Trait Implementations§

Source§

impl<T: Clone> Clone for WorkQueueRecord<T>

Source§

fn clone(&self) -> WorkQueueRecord<T>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Debug> Debug for WorkQueueRecord<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: PartialEq> PartialEq for WorkQueueRecord<T>

Source§

fn eq(&self, other: &WorkQueueRecord<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T> StructuralPartialEq for WorkQueueRecord<T>

Auto Trait Implementations§

§

impl<T> Freeze for WorkQueueRecord<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for WorkQueueRecord<T>
where T: RefUnwindSafe,

§

impl<T> Send for WorkQueueRecord<T>
where T: Send,

§

impl<T> Sync for WorkQueueRecord<T>
where T: Sync,

§

impl<T> Unpin for WorkQueueRecord<T>
where T: Unpin,

§

impl<T> UnsafeUnpin for WorkQueueRecord<T>
where T: UnsafeUnpin,

§

impl<T> UnwindSafe for WorkQueueRecord<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,