pub struct JobRow {Show 27 fields
pub id: i64,
pub kind: String,
pub queue: String,
pub args: Value,
pub state: JobState,
pub priority: i16,
pub attempt: i16,
pub run_lease: i64,
pub max_attempts: i16,
pub run_at: DateTime<Utc>,
pub heartbeat_at: Option<DateTime<Utc>>,
pub deadline_at: Option<DateTime<Utc>>,
pub attempted_at: Option<DateTime<Utc>>,
pub finalized_at: Option<DateTime<Utc>>,
pub created_at: DateTime<Utc>,
pub errors: Option<Vec<Value>>,
pub metadata: Value,
pub tags: Vec<String>,
pub unique_key: Option<Vec<u8>>,
pub unique_states: Option<u8>,
pub callback_id: Option<Uuid>,
pub callback_timeout_at: Option<DateTime<Utc>>,
pub callback_filter: Option<String>,
pub callback_on_complete: Option<String>,
pub callback_on_fail: Option<String>,
pub callback_transform: Option<String>,
pub progress: Option<Value>,
}Expand description
A row from the awa.jobs table.
Fields§
§id: i64§kind: String§queue: String§args: Value§state: JobState§priority: i16§attempt: i16§run_lease: i64§max_attempts: i16§run_at: DateTime<Utc>§heartbeat_at: Option<DateTime<Utc>>§deadline_at: Option<DateTime<Utc>>§attempted_at: Option<DateTime<Utc>>§finalized_at: Option<DateTime<Utc>>§created_at: DateTime<Utc>§errors: Option<Vec<Value>>§metadata: Value§unique_key: Option<Vec<u8>>§unique_states: Option<u8>Unique states bitmask — stored as BIT(8) in Postgres. Skipped in FromRow since it’s only used by the DB-side unique index.
callback_id: Option<Uuid>Callback ID for external webhook completion.
callback_timeout_at: Option<DateTime<Utc>>Deadline for callback timeout.
callback_filter: Option<String>CEL filter expression for callback resolution.
callback_on_complete: Option<String>CEL expression: does the payload indicate completion?
callback_on_fail: Option<String>CEL expression: does the payload indicate failure?
callback_transform: Option<String>CEL expression to transform the payload before returning.
progress: Option<Value>Structured progress reported by the handler during execution.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for JobRow
impl<'de> Deserialize<'de> for JobRow
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<'a, R: Row> FromRow<'a, R> for JobRowwhere
&'a str: ColumnIndex<R>,
i64: Decode<'a, R::Database> + Type<R::Database>,
String: Decode<'a, R::Database> + Type<R::Database>,
Value: Decode<'a, R::Database> + Type<R::Database>,
JobState: Decode<'a, R::Database> + Type<R::Database>,
i16: 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>,
Option<Vec<Value>>: Decode<'a, R::Database> + Type<R::Database>,
Vec<String>: Decode<'a, R::Database> + Type<R::Database>,
Option<Vec<u8>>: Decode<'a, R::Database> + Type<R::Database>,
Option<Uuid>: Decode<'a, R::Database> + Type<R::Database>,
Option<String>: Decode<'a, R::Database> + Type<R::Database>,
Option<Value>: Decode<'a, R::Database> + Type<R::Database>,
impl<'a, R: Row> FromRow<'a, R> for JobRowwhere
&'a str: ColumnIndex<R>,
i64: Decode<'a, R::Database> + Type<R::Database>,
String: Decode<'a, R::Database> + Type<R::Database>,
Value: Decode<'a, R::Database> + Type<R::Database>,
JobState: Decode<'a, R::Database> + Type<R::Database>,
i16: 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>,
Option<Vec<Value>>: Decode<'a, R::Database> + Type<R::Database>,
Vec<String>: Decode<'a, R::Database> + Type<R::Database>,
Option<Vec<u8>>: Decode<'a, R::Database> + Type<R::Database>,
Option<Uuid>: Decode<'a, R::Database> + Type<R::Database>,
Option<String>: Decode<'a, R::Database> + Type<R::Database>,
Option<Value>: Decode<'a, R::Database> + Type<R::Database>,
Auto Trait Implementations§
impl Freeze for JobRow
impl RefUnwindSafe for JobRow
impl Send for JobRow
impl Sync for JobRow
impl Unpin for JobRow
impl UnsafeUnpin for JobRow
impl UnwindSafe for JobRow
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