GoodMemGoodMem
ReferenceSdkRustTypes

BackgroundJobSummary

Rust struct goodmem::models::BackgroundJobSummary: declaration, fields or variants, and implementations.

All types

Struct BackgroundJobSummary

goodmem::models::BackgroundJobSummary

Summary of the most recent background job execution for a resource

pub struct BackgroundJobSummary {
    pub job_id: i64,
    pub job_type: String,
    pub status: BackgroundJobSummaryStatus,
    pub attempts: i32,
    pub max_attempts: i32,
    pub run_at: Option<i64>,
    pub lease_until: Option<i64>,
    pub locked_by: Option<String>,
    pub last_error: Option<String>,
    pub updated_at: Option<i64>,
    pub failure_stage: Option<BackgroundJobSummaryFailureStage>,
}

Referenced types: BackgroundJobSummaryFailureStage, BackgroundJobSummaryStatus.

Fields

job_id

pub job_id: i64

Database identifier of the background job Wire name: jobId.

job_type

pub job_type: String

Logical job type dispatched by the background job framework Wire name: jobType.

status

pub status: BackgroundJobSummaryStatus

Current status of the background job Wire name: status.

attempts

pub attempts: i32

Number of attempts started so far Wire name: attempts.

max_attempts

pub max_attempts: i32

Maximum number of attempts allowed for this job Wire name: maxAttempts.

run_at

pub run_at: Option<i64>

Timestamp when the job becomes eligible to run (milliseconds since epoch) Wire name: runAt.

lease_until

pub lease_until: Option<i64>

Lease expiration timestamp if the job is currently running (milliseconds since epoch) Wire name: leaseUntil.

locked_by

pub locked_by: Option<String>

Identifier of the worker currently holding the lease, if any Wire name: lockedBy.

last_error

pub last_error: Option<String>

Most recent short error message if the job failed Wire name: lastError.

updated_at

pub updated_at: Option<i64>

Timestamp when the job row was last updated (milliseconds since epoch) Wire name: updatedAt.

failure_stage

pub failure_stage: Option<BackgroundJobSummaryFailureStage>

Stage of the newest attempt's failure for this memory. Omitted for unknown or legacy failures, failures on another memory in the job, and a newer running or successful attempt. Does not imply retry exhaustion. Use jobId as the support reference. Wire name: failureStage.

Implementations

validate

pub fn validate(&self) -> crate::Result<()>

Validate the request before sending, without making an HTTP call.

Trait implementations

  • Clone (derived)
  • Default (derived)
  • PartialEq (derived)
  • Serialize (derived)
  • impl<'de> Deserialize<'de> for BackgroundJobSummary
  • impl std::fmt::Debug for BackgroundJobSummary

On this page