Setu-TS
    Preparing search index...

    Interface ProcessOptions

    Options accepted when registering a processor.

    0.1.0

    interface ProcessOptions {
        concurrency?: number;
        onFailed?: (job: IJob, error: unknown) => void | Promise<void>;
    }
    Index
    concurrency?: number

    Jobs processed concurrently by this worker (default 1).

    onFailed?: (job: IJob, error: unknown) => void | Promise<void>

    Invoked once when a job has exhausted its attempts, immediately before it is dead-lettered — the only programmatic notice that work was permanently abandoned. It does NOT fire on an attempt that will be retried.

    Without it a dead-lettered job is reachable only by opening a Redis client: IQueue has no getJob and no dead-letter accessor, and the adapters' dead-letter structures are internal.

    A callback that throws is reported through the application's logger and swallowed; the dead-letter still happens, because losing the job as well as the notification would be strictly worse than losing the notification.

    Type Declaration

      • (job: IJob, error: unknown): void | Promise<void>
      • Parameters

        • job: IJob

          The job as its processor last received it, with the final attempts count

        • error: unknown

          The value the processor threw on the final attempt

        Returns void | Promise<void>

    0.3.0