TaskRunConfig
The TaskRunConfig
type represents a configuration you can provide for a task run.
{
maxDuration?: DurationMs;
maxRetries?: number;
retryDelay?: DurationMs | string;
}
Type | Description | |
---|---|---|
maxDuration? | DurationMs | The optional maximum time in milliseconds that a task can run for before a signal is sent to abort it, defaulting to 1000. |
maxRetries? | number | The optional number of times that a task can will be retried if it fails or times out, defaulting to 0. |
retryDelay? | DurationMs | string | The optional duration between task run retries in milliseconds, defaulting to 1000. This can also be a string of comma delimited numbers if you want to implement a back-off strategy, for example. |
This can be provided for a specific task run (via the scheduleTaskRun
method), all runs of a task (via the setTask
method), or for all runs of tasks in a category (via the setCategory
method).
Individual configuration items for a task run will override that of the Task
, which in turn override those of a task category, if any. The Manager
itself provides defaults if none are provided at any level.
This has properties which let you indicate the duration of task runs and their retry behaviors, for example.
Since
v1.0.0