pub struct WorkerInfo {
pub id: i64,
pub hostname: String,
pub port: i32,
pub queue_id: Option<i64>,
pub started_at: DateTime<Utc>,
pub heartbeat_at: DateTime<Utc>,
pub shutdown_at: Option<DateTime<Utc>>,
pub status: WorkerStatus,
}Expand description
A worker instance that processes messages from queues
Fields§
§id: i64Unique worker ID
hostname: StringHostname where the worker is running (“ephemeral” for ephemeral workers)
port: i32Port number for the worker (-1 for ephemeral workers)
queue_id: Option<i64>Queue ID this worker is processing (None for Admin workers)
started_at: DateTime<Utc>Timestamp when the worker started
heartbeat_at: DateTime<Utc>Last heartbeat timestamp
shutdown_at: Option<DateTime<Utc>>Timestamp when shutdown was initiated (if any)
status: WorkerStatusCurrent status of the worker
Trait Implementations§
Source§impl Clone for WorkerInfo
impl Clone for WorkerInfo
Source§fn clone(&self) -> WorkerInfo
fn clone(&self) -> WorkerInfo
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 WorkerInfo
impl Debug for WorkerInfo
Source§impl<'de> Deserialize<'de> for WorkerInfo
impl<'de> Deserialize<'de> for WorkerInfo
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
Source§impl Display for WorkerInfo
impl Display for WorkerInfo
Source§impl<'a, R: Row> FromRow<'a, R> for WorkerInfowhere
&'a str: ColumnIndex<R>,
i64: Decode<'a, R::Database> + Type<R::Database>,
String: Decode<'a, R::Database> + Type<R::Database>,
i32: Decode<'a, R::Database> + Type<R::Database>,
Option<i64>: Decode<'a, R::Database> + Type<R::Database>,
DateTime<Utc>: Decode<'a, R::Database> + Type<R::Database>,
Option<DateTime<Utc>>: Decode<'a, R::Database> + Type<R::Database>,
WorkerStatus: Decode<'a, R::Database> + Type<R::Database>,
impl<'a, R: Row> FromRow<'a, R> for WorkerInfowhere
&'a str: ColumnIndex<R>,
i64: Decode<'a, R::Database> + Type<R::Database>,
String: Decode<'a, R::Database> + Type<R::Database>,
i32: Decode<'a, R::Database> + Type<R::Database>,
Option<i64>: Decode<'a, R::Database> + Type<R::Database>,
DateTime<Utc>: Decode<'a, R::Database> + Type<R::Database>,
Option<DateTime<Utc>>: Decode<'a, R::Database> + Type<R::Database>,
WorkerStatus: Decode<'a, R::Database> + Type<R::Database>,
Source§impl Serialize for WorkerInfo
impl Serialize for WorkerInfo
Source§impl Tabled for WorkerInfo
impl Tabled for WorkerInfo
Auto Trait Implementations§
impl Freeze for WorkerInfo
impl RefUnwindSafe for WorkerInfo
impl Send for WorkerInfo
impl Sync for WorkerInfo
impl Unpin for WorkerInfo
impl UnwindSafe for WorkerInfo
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