pub enum WorkQueueCommand<T = ()> {
Submit {
payload: T,
command_id: String,
queue_id: Option<String>,
idempotency_key: Option<String>,
},
Claim {
command_id: String,
queue_id: Option<String>,
idempotency_key: Option<String>,
worker_id: String,
requested_work_ids: Vec<String>,
limit: Option<usize>,
lease_duration_ms: Option<u64>,
now_ms: Option<u64>,
},
RenewLease {
command_id: String,
queue_id: Option<String>,
idempotency_key: Option<String>,
work_id: String,
lease_id: String,
attempt: u32,
worker_id: String,
lease_duration_ms: Option<u64>,
lease_expires_at_ms: Option<u64>,
now_ms: Option<u64>,
},
Release {
command_id: String,
queue_id: Option<String>,
idempotency_key: Option<String>,
work_id: String,
lease_id: String,
attempt: u32,
worker_id: String,
reason: Option<String>,
now_ms: Option<u64>,
},
Complete {
command_id: String,
queue_id: Option<String>,
idempotency_key: Option<String>,
work_id: String,
lease_id: String,
attempt: u32,
worker_id: String,
result: Option<String>,
now_ms: Option<u64>,
},
Fail {
command_id: String,
queue_id: Option<String>,
idempotency_key: Option<String>,
work_id: String,
lease_id: String,
attempt: u32,
worker_id: String,
error: Option<String>,
retryable: Option<bool>,
now_ms: Option<u64>,
},
Cancel {
command_id: String,
queue_id: Option<String>,
idempotency_key: Option<String>,
work_id: String,
reason: Option<String>,
now_ms: Option<u64>,
},
Schedule {
command_id: String,
queue_id: Option<String>,
idempotency_key: Option<String>,
work_id: String,
schedule_id: Option<String>,
not_before_ms: u64,
deadline_ms: Option<u64>,
reason: Option<String>,
now_ms: Option<u64>,
},
ExpireLeases {
command_id: String,
queue_id: Option<String>,
idempotency_key: Option<String>,
work_ids: Vec<String>,
limit: Option<usize>,
now_ms: Option<u64>,
},
}Expand description
WorkQueueCommand variants.
Variants§
Submit
Submit variant.
Fields
§
payload: Tpayload field for payload.
Claim
Claim variant.
Fields
RenewLease
RenewLease variant.
Fields
Release
Release variant.
Fields
Complete
Complete variant.
Fields
Fail
Fail variant.
Fields
Cancel
Cancel variant.
Fields
Schedule
Schedule variant.
Fields
ExpireLeases
ExpireLeases variant.
Fields
Trait Implementations§
Source§impl<T: Clone> Clone for WorkQueueCommand<T>
impl<T: Clone> Clone for WorkQueueCommand<T>
Source§fn clone(&self) -> WorkQueueCommand<T>
fn clone(&self) -> WorkQueueCommand<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Debug> Debug for WorkQueueCommand<T>
impl<T: Debug> Debug for WorkQueueCommand<T>
Source§impl<T: PartialEq> PartialEq for WorkQueueCommand<T>
impl<T: PartialEq> PartialEq for WorkQueueCommand<T>
impl<T> StructuralPartialEq for WorkQueueCommand<T>
Auto Trait Implementations§
impl<T> Freeze for WorkQueueCommand<T>where
T: Freeze,
impl<T> RefUnwindSafe for WorkQueueCommand<T>where
T: RefUnwindSafe,
impl<T> Send for WorkQueueCommand<T>where
T: Send,
impl<T> Sync for WorkQueueCommand<T>where
T: Sync,
impl<T> Unpin for WorkQueueCommand<T>where
T: Unpin,
impl<T> UnsafeUnpin for WorkQueueCommand<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for WorkQueueCommand<T>where
T: UnwindSafe,
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