[][src]Struct cortex::models::HistoricalRun

pub struct HistoricalRun {
    pub id: i32,
    pub service_id: i32,
    pub corpus_id: i32,
    pub total: i32,
    pub invalid: i32,
    pub fatal: i32,
    pub error: i32,
    pub warning: i32,
    pub no_problem: i32,
    pub in_progress: i32,
    pub start_time: NaiveDateTime,
    pub end_time: Option<NaiveDateTime>,
    pub owner: String,
    pub description: String,
}

Historical (Corpus, Service) run records

Fields

id: i32

task primary key, auto-incremented by postgresql

service_id: i32

id of the service owning this task

corpus_id: i32

id of the corpus hosting this task

total: i32

total tasks in run

invalid: i32

invalid tasks in run

fatal: i32

fatal results in run

error: i32

error results in run

warning: i32

warning results in run

no_problem: i32

results with no notable problems in run

in_progress: i32

tasks still in progress at end of run

start_time: NaiveDateTime

start timestamp of run

end_time: Option<NaiveDateTime>

end timestamp of run, i.e. timestamp of next run initiation

owner: String

owner who initiated the run

description: String

description of the purpose of this run

Implementations

impl HistoricalRun[src]

pub fn find_by(
    corpus: &Corpus,
    service: &Service,
    connection: &PgConnection
) -> Result<Vec<HistoricalRun>, Error>
[src]

Obtain all historical runs for a given (Corpus, Service) pair

pub fn find_current(
    corpus: &Corpus,
    service: &Service,
    connection: &PgConnection
) -> Result<Option<HistoricalRun>, Error>
[src]

Obtain a currently ongoing run entry for a (Corpus, Service) pair, if any

pub fn mark_completed(&self, connection: &PgConnection) -> Result<(), Error>[src]

Mark this historical run as completed, by setting end_time to the current time.

Trait Implementations

impl Clone for HistoricalRun[src]

impl Debug for HistoricalRun[src]

impl Eq for HistoricalRun[src]

impl From<HistoricalRun> for RunMetadata[src]

impl HasTable for HistoricalRun[src]

type Table = table

The table this type is associated with.

impl<'ident> Identifiable for &'ident HistoricalRun[src]

type Id = &'ident i32

The type of this struct's identifier. Read more

impl PartialEq<HistoricalRun> for HistoricalRun[src]

impl<__DB: Backend, __ST> Queryable<__ST, __DB> for HistoricalRun where
    (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, NaiveDateTime, Option<NaiveDateTime>, String, String): Queryable<__ST, __DB>, 
[src]

type Row = <(i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, NaiveDateTime, Option<NaiveDateTime>, String, String) as Queryable<__ST, __DB>>::Row

The Rust type you'd like to map from. Read more

impl<__DB: Backend> QueryableByName<__DB> for HistoricalRun where
    i32: FromSql<SqlTypeOf<id>, __DB>,
    i32: FromSql<SqlTypeOf<service_id>, __DB>,
    i32: FromSql<SqlTypeOf<corpus_id>, __DB>,
    i32: FromSql<SqlTypeOf<total>, __DB>,
    i32: FromSql<SqlTypeOf<invalid>, __DB>,
    i32: FromSql<SqlTypeOf<fatal>, __DB>,
    i32: FromSql<SqlTypeOf<error>, __DB>,
    i32: FromSql<SqlTypeOf<warning>, __DB>,
    i32: FromSql<SqlTypeOf<no_problem>, __DB>,
    i32: FromSql<SqlTypeOf<in_progress>, __DB>,
    NaiveDateTime: FromSql<SqlTypeOf<start_time>, __DB>,
    Option<NaiveDateTime>: FromSql<SqlTypeOf<end_time>, __DB>,
    String: FromSql<SqlTypeOf<owner>, __DB>,
    String: FromSql<SqlTypeOf<description>, __DB>, 
[src]

impl StructuralEq for HistoricalRun[src]

impl StructuralPartialEq for HistoricalRun[src]

Auto Trait Implementations

impl RefUnwindSafe for HistoricalRun

impl Send for HistoricalRun

impl Sync for HistoricalRun

impl Unpin for HistoricalRun

impl UnwindSafe for HistoricalRun

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, I> AsResult<T, I> for T where
    I: Input, 

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoCollection<T> for T

impl<T> IntoSql for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Sealed<T> for T where
    T: ?Sized

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Typeable for T where
    T: Any

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,