@taskforcesh/bullmq-pro - v7.49.0
    Preparing search index...

    Class WorkerPro<DataType, ResultType, NameType>

    Worker

    Type Parameters

    • DataType = any
    • ResultType = any
    • NameType extends string = string

    Hierarchy

    Index
    scripts: ScriptsPro
    RateLimitError: () => Error = Worker.RateLimitError
    • get jobScheduler(): Promise<JobSchedulerPro>

      Returns Promise<JobSchedulerPro>

    • Returns a promise that resolves to the next job in queue.

      Parameters

      • token: string

        worker token to be assigned to retrieved job

      • __namedParameters: GetNextJobOptions = {}

      Returns Promise<JobPro<DataType, ResultType, NameType>>

      a JobPro or undefined if no job was available in the queue.

    • Overrides the rate limit so that it becomes active for the given group.

      Parameters

      • job: JobPro

        Job currently being processed, and whose group we want to rate limit.

      • expireTimeMs: number

        Expire time in ms of this rate limit.

      Returns Promise<void>