Beignet API reference
    Preparing search index...

    Interface RunJobHandlerOptions<J, Ctx>

    Options for running one parsed job handler attempt.

    interface RunJobHandlerOptions<
        J extends JobDef<string, StandardSchema, Ctx>,
        Ctx,
    > {
        attempt?: number;
        ctx: Ctx | (() => MaybePromise<Ctx>);
        hooks?: readonly (
            (
                args: JobHookArgs<JobDef<string, StandardSchema, Ctx>, Ctx>,
                next: () => Promise<void>,
            ) => MaybePromise<void>
        )[];
        job: J;
        maxAttempts?: number;
        payload: InferJobPayload<J>;
        trace?: TraceCarrier;
        tracing?: TracingPort;
    }

    Type Parameters

    Index
    attempt?: number

    One-based execution attempt when the runner can report it.

    ctx: Ctx | (() => MaybePromise<Ctx>)

    Handler context or factory resolved inside the job span.

    hooks?: readonly (
        (
            args: JobHookArgs<JobDef<string, StandardSchema, Ctx>, Ctx>,
            next: () => Promise<void>,
        ) => MaybePromise<void>
    )[]

    Runner-level hooks. These wrap job-local hooks.

    job: J

    Job definition to execute.

    maxAttempts?: number

    Maximum execution attempts when the runner can report it.

    payload: InferJobPayload<J>

    Parsed job payload.

    trace?: TraceCarrier

    Trace context captured by the dispatching process.

    tracing?: TracingPort

    Runtime tracing port used before a lazy context factory runs.