Interface WorkerProOptions

Hierarchy

  • WorkerOptions
    • WorkerProOptions

Properties

Properties

batch?: {
    minSize?: number;
    size?: number;
    timeout?: number;
}

Type declaration

  • Optional minSize?: number

    Minimum amount of jobs that must be fetched at once as a batch. Note that if there are not enough jobs in the queue, the worker will wait until there are enough jobs to fetch, potentially waiting indefinitely, even if there are some jobs to process, but not enough to reach the minimum size.

  • Optional size?: number

    Amount of jobs that can be fetched at once as a batch.

  • Optional timeout?: number

    The maximum time in milliseconds to wait for at least minSize jobs to become available when minSize is defined. If this time elapses and the number of available jobs is still less than minSize, the worker will fetch up to size jobs that are currently available. This option allows controlling how long to wait for a batch to reach the minimum size before processing whatever jobs are available.

    Default

    undefined (wait indefinitely when minSize > 1)

ttl?: number | JobTtlMap

Generated using TypeDoc