Setu-TS
    Preparing search index...

    Interface IJob<T>

    A queued job delivered to a processor.

    0.1.0

    interface IJob<T = unknown> {
        attempts: number;
        data: T;
        headers?: Readonly<Record<string, string>>;
        id: string;
        name: string;
    }

    Type Parameters

    • T = unknown

      The job payload type

    Index
    attempts: number

    How many times this job has been attempted (1 on first delivery).

    data: T

    The job payload.

    headers?: Readonly<Record<string, string>>

    Transport headers carried with the job, mirroring MessageMetadata.headers so the two ingresses cannot drift on meaning: {} means the channel was read and carried nothing; absent means there was no channel.

    This is the queue's half of trace propagation. A framework with a CAPABILITIES.TELEMETRY provider writes a W3C traceparent here when the job is enqueued, so the processor's work joins the trace of the request that caused it; without one, the map holds only what the caller passed in AddJobOptions.headers.

    Absent is a real answer and never substituted with {}: an IQueue implementation whose transport cannot carry a header omits the member rather than reporting an empty one, so "this queue has no channel" stays distinguishable from "the channel was empty".

    0.5.0

    id: string

    Queue-assigned job ID.

    name: string

    The job name it was enqueued under.