bullmq - v5.81.1
    Preparing search index...

    Class LockManager

    Manages lock renewal for BullMQ workers. It periodically extends locks for active jobs to prevent them from being considered stalled by other workers.

    Index
    • Cancels all tracked jobs by aborting their signals.

      Parameters

      • Optionalreason: string

        Optional reason for the cancellation

      Returns void

    • Cancels a specific job by aborting its signal.

      Parameters

      • jobId: string

        The ID of the job to cancel

      • Optionalreason: string

        Optional reason for the cancellation

      Returns boolean

      true if the job was found and cancelled, false otherwise

    • Gets a list of all tracked job IDs.

      Returns string[]

      Array of job IDs currently being tracked

    • Adds a job to be tracked for lock renewal. Returns an AbortController if shouldCreateController is true, undefined otherwise.

      Parameters

      • jobId: string
      • token: string
      • ts: number
      • shouldCreateController: boolean = false

      Returns AbortController

    • Removes a job from lock renewal tracking.

      Parameters

      • jobId: string

      Returns void