Skip to main content

Interface: RetryPolicy

client.RetryPolicy

Options for retrying Workflows and Activities

Properties

backoffCoefficient

Optional backoffCoefficient: number

Coefficient used to calculate the next retry interval. The next retry interval is previous interval multiplied by this coefficient.

minimum 1

default 2


initialInterval

Optional initialInterval: string | number

Interval of the first retry. If coefficient is 1 then it is used for all retries

format ms formatted string or number of milliseconds

default 1 second


maximumAttempts

Optional maximumAttempts: number

Maximum number of attempts. When exceeded the retries stop even if not expired yet.

minimum 1

default Infinity


maximumInterval

Optional maximumInterval: string | number

Maximum interval between retries. Exponential backoff leads to interval increase. This value is the cap of the increase.

default 100x of initialInterval

format ms formatted string or number of milliseconds


nonRetryableErrorTypes

Optional nonRetryableErrorTypes: string[]

List of application failures types to not retry.