GoodMemGoodMem
ReferenceSdkRustTypes

BackgroundJobAttempt

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

All types

Struct BackgroundJobAttempt

goodmem::models::BackgroundJobAttempt

Telemetry captured for a single execution attempt of a background job

pub struct BackgroundJobAttempt {
    pub attempt_id: i64,
    pub job_id: i64,
    pub started_at: Option<i64>,
    pub finished_at: Option<i64>,
    pub ok: Option<bool>,
    pub worker_id: Option<String>,
    pub status_message: Option<String>,
    pub progress_current: i64,
    pub progress_total: Option<i64>,
    pub progress_unit: Option<String>,
    pub progress_updated_at: Option<i64>,
    pub error_message: Option<String>,
    pub error_stacktrace: Option<String>,
    pub failure_stage: Option<BackgroundJobAttemptFailureStage>,
}

Referenced types: BackgroundJobAttemptFailureStage.

Fields

attempt_id

pub attempt_id: i64

Identifier of the attempt Wire name: attemptId.

job_id

pub job_id: i64

Identifier of the job that owns this attempt Wire name: jobId.

started_at

pub started_at: Option<i64>

Attempt start timestamp (milliseconds since epoch) Wire name: startedAt.

finished_at

pub finished_at: Option<i64>

Attempt completion timestamp (milliseconds since epoch) Wire name: finishedAt.

ok

pub ok: Option<bool>

Indicates whether the attempt succeeded (null if still running) Wire name: ok.

worker_id

pub worker_id: Option<String>

Identifier of the worker processing the attempt Wire name: workerId.

status_message

pub status_message: Option<String>

Latest status message reported by the worker Wire name: statusMessage.

progress_current

pub progress_current: i64

Current progress counter value Wire name: progressCurrent.

progress_total

pub progress_total: Option<i64>

Total progress target when known Wire name: progressTotal.

progress_unit

pub progress_unit: Option<String>

Unit label associated with the progress counters Wire name: progressUnit.

progress_updated_at

pub progress_updated_at: Option<i64>

Timestamp when progress was last updated (milliseconds since epoch) Wire name: progressUpdatedAt.

error_message

pub error_message: Option<String>

Short error message recorded when the attempt failed Wire name: errorMessage.

error_stacktrace

pub error_stacktrace: Option<String>

Stack trace captured when the attempt failed, if available Wire name: errorStacktrace.

failure_stage

pub failure_stage: Option<BackgroundJobAttemptFailureStage>

Stage of this attempt's failure for this memory. Omitted when unknown or when another memory in the same job failed. This is not the current progress stage and 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 BackgroundJobAttempt
  • impl std::fmt::Debug for BackgroundJobAttempt

On this page