StateJobInfo

Type

Signature

type StateJobInfo = {
  attempt: number;
  attemptAt: Date | null;
  attemptBy: string | null;
  attemptToken: string | null;
  chainId: string;
  chainIndex: number;
  completedAt: Date | null;
  completedBy: string | null;
  continuedToId: string | null;
  createdAt: Date;
  id: string;
  input: unknown;
  lastAttemptAt: Date | null;
  lastAttemptError: string | null;
  output: unknown;
  scheduledAt: Date;
  status: StateJobStatus;
  traceContext: string | null;
  typeName: string;
};

core/src/state-adapter/state-adapter.ts:15

A job row as a state adapter returns it, without its chain.

Properties

  • attempt
    number

    Number of processing attempts so far.

  • attemptAt
    Date | null

    When the current attempt started, or null when the job is not running.

  • attemptBy
    string | null

    Worker that owns the current attempt, or null when the job is not running.

  • attemptToken
    string | null

    Token of the current attempt, which attempt-scoped writes must present.

  • chainId
    string

    ID of the chain the job belongs to, equal to the ID of the chain's head job.

  • chainIndex
    number

    Position in the chain, starting at 0 for the head.

  • completedAt
    Date | null

    When the job completed, or null before.

  • completedBy
    string | null

    Worker that completed the job, or null for a workerless completion or before.

  • continuedToId
    string | null

    ID of the job it continued to, or null for a terminal or not yet completed job.

  • createdAt
    Date

    When the job was created.

  • id
    string

    Job ID.

  • input
    unknown

    Stored input.

  • lastAttemptAt
    Date | null

    When the last failed or reclaimed attempt ended, or null before one.

  • lastAttemptError
    string | null

    Serialized error of the last failed or reclaimed attempt, or null before one.

  • output
    unknown

    Stored output of a terminally completed job, otherwise null.

  • scheduledAt
    Date

    When the job becomes eligible for processing.

  • status
    StateJobStatus

    Current status.

  • traceContext
    string | null

    Serialized trace context of the job, for observability adapters.

  • typeName
    string

    Job type name.

esc

Search guides, integrations and every exported symbol.

↑ ↓ to navigate↵ to open