Interface WellIdentifiedTaskOptions<Binding>

Extends the task options with the task identifier, making it mandatory

interface WellIdentifiedTaskOptions<Binding = any> {
    bind?: Binding;
    id: string;
    priority?: number;
    retryOptions?: RetryOptions;
    retryStrategy?: RetryStrategy;
    weight?: number;
}

Type Parameters

  • Binding = any

Hierarchy (View Summary)

Properties

bind?: Binding

Context to be bind to the task

id: string

Task identifier, it necessary to identify the task during all the process, for example, when the job is executed, the event with the task identifier will be emitted with the result of the task.

priority?: number

The priority of the task. A higher value means a higher priority. The default priority is 0.

0
retryOptions?: RetryOptions

Set the options for the retry process of the task

undefined
retryStrategy?: RetryStrategy

Set the strategy to retry the task

RETRY_STRATEGY.RETRY
weight?: number

The weight of the task, this define the number of tokens that the task will consume from the bucket. The default weight is 1.

1