bullmq - v5.66.4
    Preparing search index...

    Interface LockManagerWorkerContext

    Minimal interface that LockManager needs from Worker. This allows LockManager to access worker methods without inheriting from QueueBase.

    interface LockManagerWorkerContext {
        name: string;
        emit(event: string | symbol, ...args: any[]): boolean;
        extendJobLocks(
            jobIds: string[],
            tokens: string[],
            duration: number,
        ): Promise<string[]>;
        trace<T>(
            spanKind: any,
            operation: string,
            destination: string,
            callback: (span?: Span) => T | Promise<T>,
        ): T | Promise<T>;
    }
    Index

    Properties

    Methods

    Properties

    name: string

    Queue name for telemetry.

    Methods

    • Extends locks for multiple jobs.

      Parameters

      • jobIds: string[]
      • tokens: string[]
      • duration: number

      Returns Promise<string[]>

    • Wraps code with telemetry tracing.

      Type Parameters

      • T

      Parameters

      • spanKind: any
      • operation: string
      • destination: string
      • callback: (span?: Span) => T | Promise<T>

      Returns T | Promise<T>