Interface IAsyncRetryOptions

Hierarchy

  • WrapOptions
    • IAsyncRetryOptions

Properties

factor?: number

The exponential factor to use.

Default

2
forever?: boolean

Whether to retry forever.

Default

false
maxRetryTime?: number

The maximum time (in milliseconds) that the retried operation is allowed to run.

Default

Infinity
maxTimeout?: number

The maximum number of milliseconds between two retries.

Default

Infinity
minTimeout?: number

The number of milliseconds before starting the first retry.

Default

1000
onRetry?: ((e, attempt) => any)

Type declaration

    • (e, attempt): any
    • An optional function that is invoked after a new retry is performed. It's passed the Error that triggered it as a parameter.

      Parameters

      • e: Error
      • attempt: number

      Returns any

randomize?: boolean

Randomizes the timeouts by multiplying a factor between 1-2.

Default

false
retries?: number

The maximum amount of times to retry the operation.

Default

10
unref?: boolean

Whether to unref the setTimeout's.

Default

false

Generated using TypeDoc