[][src]Struct rebuilderd::models::Queued

pub struct Queued {
    pub id: i32,
    pub package_id: i32,
    pub version: String,
    pub priority: i32,
    pub queued_at: NaiveDateTime,
    pub worker_id: Option<i32>,
    pub started_at: Option<NaiveDateTime>,
    pub last_ping: Option<NaiveDateTime>,
}

Fields

id: i32package_id: i32version: Stringpriority: i32queued_at: NaiveDateTimeworker_id: Option<i32>started_at: Option<NaiveDateTime>last_ping: Option<NaiveDateTime>

Implementations

impl Queued[src]

pub fn get_id(my_id: i32, connection: &SqliteConnection) -> Result<Queued>[src]

pub fn get(
    pkg: i32,
    my_version: &str,
    connection: &SqliteConnection
) -> Result<Option<Queued>>
[src]

pub fn pop_next(
    my_worker_id: i32,
    connection: &SqliteConnection
) -> Result<Option<QueueItem>>
[src]

pub fn ping_job(&mut self, connection: &SqliteConnection) -> Result<()>[src]

pub fn delete(&self, connection: &SqliteConnection) -> Result<()>[src]

pub fn list(
    limit: Option<i64>,
    connection: &SqliteConnection
) -> Result<Vec<Queued>>
[src]

pub fn update(&self, connection: &SqliteConnection) -> Result<()>[src]

pub fn queue_batch(
    pkgs: &[(i32, String)],
    priority: i32,
    connection: &SqliteConnection
) -> Result<()>
[src]

pub fn drop_for_pkgs(pkgs: &[i32], connection: &SqliteConnection) -> Result<()>[src]

pub fn requeue(&self, connection: &SqliteConnection) -> Result<()>[src]

pub fn free_stale_jobs(connection: &SqliteConnection) -> Result<()>[src]

pub fn into_api_item(self, connection: &SqliteConnection) -> Result<QueueItem>[src]

Trait Implementations

impl<'update> AsChangeset for &'update Queued[src]

type Target = table

The table which Self::Changeset will be updating

type Changeset = <(Eq<package_id, &'update i32>, Eq<version, &'update String>, Eq<priority, &'update i32>, Eq<queued_at, &'update NaiveDateTime>, Option<Eq<worker_id, &'update i32>>, Option<Eq<started_at, &'update NaiveDateTime>>, Option<Eq<last_ping, &'update NaiveDateTime>>) as AsChangeset>::Changeset

The update statement this type represents

impl<'update> AsChangeset for Queued[src]

type Target = table

The table which Self::Changeset will be updating

type Changeset = <(Eq<package_id, i32>, Eq<version, String>, Eq<priority, i32>, Eq<queued_at, NaiveDateTime>, Option<Eq<worker_id, i32>>, Option<Eq<started_at, NaiveDateTime>>, Option<Eq<last_ping, NaiveDateTime>>) as AsChangeset>::Changeset

The update statement this type represents

impl Debug for Queued[src]

impl HasTable for Queued[src]

type Table = table

The table this type is associated with.

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

type Id = &'ident i32

The type of this struct's identifier. Read more

impl PartialEq<Queued> for Queued[src]

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

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

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

impl Serialize for Queued[src]

impl StructuralPartialEq for Queued[src]

Auto Trait Implementations

impl RefUnwindSafe for Queued

impl Send for Queued

impl Sync for Queued

impl Unpin for Queued

impl UnwindSafe for Queued

Blanket Implementations

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

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

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

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

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

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

impl<T> IntoSql for T[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

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<V, T> VZip<V> for T where
    V: MultiLane<T>,