[−][src]Struct cortex::models::WorkerMetadata
Metadata collection for workers, updated by the dispatcher upon zmq transactions
Fields
id: i32
task primary key, auto-incremented by postgresql
service_id: i32
associated service for this worker metadata set
last_dispatched_task_id: i64
time of last ventilator dispatch to the service
last_returned_task_id: Option<i64>
time of last sink job received from the service
total_dispatched: i32
dispatch totals
total_returned: i32
return totals
first_seen: SystemTime
first registered ventilator request for this worker, coincides with insertion in DB
session_seen: Option<SystemTime>
first time seen in the current dispatcher session
time_last_dispatch: SystemTime
time of last dispatched task
time_last_return: Option<SystemTime>
time of last returned job result
name: String
identity of this worker, usually hostname:pid
Implementations
impl WorkerMetadata
[src]
pub fn record_dispatched(
name: String,
service_id: i32,
last_dispatched_task_id: i64,
backend_address: String
) -> Result<(), Error>
[src]
name: String,
service_id: i32,
last_dispatched_task_id: i64,
backend_address: String
) -> Result<(), Error>
Update the metadata for a worker which was just dispatched to
pub fn record_received(
identity: String,
service_id: i32,
last_returned_task_id: i64,
backend_address: String
) -> Result<(), Error>
[src]
identity: String,
service_id: i32,
last_returned_task_id: i64,
backend_address: String
) -> Result<(), Error>
Update the metadata for a worker which was just received from
pub fn find_by_name(
identity: &str,
sid: i32,
connection: &PgConnection
) -> Result<WorkerMetadata, Error>
[src]
identity: &str,
sid: i32,
connection: &PgConnection
) -> Result<WorkerMetadata, Error>
Load worker metadata record by identity and service id
Trait Implementations
impl Clone for WorkerMetadata
[src]
fn clone(&self) -> WorkerMetadata
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for WorkerMetadata
[src]
impl From<WorkerMetadata> for HashMap<String, String>
[src]
impl HasTable for WorkerMetadata
[src]
impl<'ident> Identifiable for &'ident WorkerMetadata
[src]
impl<__DB: Backend, __ST> Queryable<__ST, __DB> for WorkerMetadata where
(i32, i32, i64, Option<i64>, i32, i32, SystemTime, Option<SystemTime>, SystemTime, Option<SystemTime>, String): Queryable<__ST, __DB>,
[src]
(i32, i32, i64, Option<i64>, i32, i32, SystemTime, Option<SystemTime>, SystemTime, Option<SystemTime>, String): Queryable<__ST, __DB>,
type Row = <(i32, i32, i64, Option<i64>, i32, i32, SystemTime, Option<SystemTime>, SystemTime, Option<SystemTime>, String) as Queryable<__ST, __DB>>::Row
The Rust type you'd like to map from. Read more
fn build(row: Self::Row) -> Self
[src]
impl Serialize for WorkerMetadata
[src]
Auto Trait Implementations
impl RefUnwindSafe for WorkerMetadata
impl Send for WorkerMetadata
impl Sync for WorkerMetadata
impl Unpin for WorkerMetadata
impl UnwindSafe for WorkerMetadata
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T, I> AsResult<T, I> for T where
I: Input,
I: Input,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IntoCollection<T> for T
fn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
A: Array<Item = T>,
fn mapped<U, F, A>(self, f: F) -> SmallVec<A> where
A: Array<Item = U>,
F: FnMut(T) -> U,
A: Array<Item = U>,
F: FnMut(T) -> U,
impl<T> IntoSql for T
fn into_sql<T>(self) -> Self::Expression where
Self: AsExpression<T>,
Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
&'a Self: AsExpression<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Sealed<T> for T where
T: ?Sized,
T: ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Typeable for T where
T: Any,
T: Any,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,