pub enum TaskLifecycleEvent {
Enqueued {
queue: String,
priority: TaskPriority,
payload_size_bytes: usize,
max_retries: u32,
timeout_seconds: u64,
},
Dequeued {
worker_id: String,
queue: String,
wait_time_ms: u64,
payload_size_bytes: usize,
},
ExecutionStarted {
worker_id: String,
attempt: u32,
max_retries: u32,
},
ExecutionCompleted {
worker_id: String,
duration_ms: u64,
result_size_bytes: usize,
attempt: u32,
},
ExecutionFailed {
worker_id: String,
duration_ms: u64,
error: String,
error_source: Option<String>,
attempt: u32,
},
Retrying {
attempt: u32,
max_retries: u32,
delay_ms: u64,
reason: String,
},
PermanentlyFailed {
total_attempts: u32,
final_error: String,
total_duration_ms: u64,
},
Scheduled {
execute_at: DateTime<Utc>,
delay_ms: i64,
queue: String,
},
MovedToRegularQueue {
from_scheduled: bool,
delay_from_scheduled_ms: i64,
queue: String,
},
}
Expand description
Task lifecycle events for comprehensive observability
Variants§
Enqueued
Task has been enqueued
Fields
§
priority: TaskPriority
Dequeued
Task has been dequeued by a worker
ExecutionStarted
Task execution has started
ExecutionCompleted
Task execution completed successfully
ExecutionFailed
Task execution failed
Retrying
Task is being retried
PermanentlyFailed
Task has permanently failed
Scheduled
Task has been scheduled for delayed execution
MovedToRegularQueue
Scheduled task moved to regular queue
Trait Implementations§
Source§impl Clone for TaskLifecycleEvent
impl Clone for TaskLifecycleEvent
Source§fn clone(&self) -> TaskLifecycleEvent
fn clone(&self) -> TaskLifecycleEvent
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 Debug for TaskLifecycleEvent
impl Debug for TaskLifecycleEvent
Source§impl<'de> Deserialize<'de> for TaskLifecycleEvent
impl<'de> Deserialize<'de> for TaskLifecycleEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TaskLifecycleEvent
impl RefUnwindSafe for TaskLifecycleEvent
impl Send for TaskLifecycleEvent
impl Sync for TaskLifecycleEvent
impl Unpin for TaskLifecycleEvent
impl UnwindSafe for TaskLifecycleEvent
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