Interface JobSnapshot<T>

Snapshot of a job's state. Returned from IJobRun.poll() and emitted to IJobRun.watch listeners. The result/error fields are filled only for terminal states.

interface JobSnapshot<T> {
    error?: JobError;
    progress?: JobProgress;
    result?: JobResult<T>;
    status: JobStatus;
}

Type Parameters

  • T = unknown

Properties

error?: JobError

Error envelope returned for terminal failed snapshots.

progress?: JobProgress
result?: JobResult<T>

Payload returned for terminal successful snapshots only.

status: JobStatus