pub enum WorkerEvent<'a> {
Started {
worker_id: &'a str,
},
Polling,
JobClaimed {
job: &'a HarvestJob,
},
JobStarted {
job_id: Uuid,
portal_url: &'a str,
},
JobCompleted {
job_id: Uuid,
stats: &'a SyncStats,
},
JobFailed {
job_id: Uuid,
error: &'a str,
will_retry: bool,
},
JobCancelled {
job_id: Uuid,
stats: &'a SyncStats,
},
ShuttingDown {
worker_id: &'a str,
jobs_released: u64,
},
Stopped {
worker_id: &'a str,
},
}Expand description
Events emitted by the worker during operation.
Variants§
Started
Worker started and is ready to process jobs.
Polling
Worker is polling for new jobs.
JobClaimed
Worker claimed a job.
Fields
§
job: &'a HarvestJobJobStarted
Job processing started.
JobCompleted
Job completed successfully.
JobFailed
Job failed with error.
JobCancelled
Job was cancelled.
ShuttingDown
Worker is shutting down.
Stopped
Worker stopped.
Trait Implementations§
Source§impl<'a> Clone for WorkerEvent<'a>
impl<'a> Clone for WorkerEvent<'a>
Source§fn clone(&self) -> WorkerEvent<'a>
fn clone(&self) -> WorkerEvent<'a>
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 moreAuto Trait Implementations§
impl<'a> Freeze for WorkerEvent<'a>
impl<'a> RefUnwindSafe for WorkerEvent<'a>
impl<'a> Send for WorkerEvent<'a>
impl<'a> Sync for WorkerEvent<'a>
impl<'a> Unpin for WorkerEvent<'a>
impl<'a> UnwindSafe for WorkerEvent<'a>
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 more