retryWithBackoff
retryWithBackoff<
T>(fn,options,attempt?):Promise<T>
Defined in: packages/simply-core/src/async/retryWithBackoff.ts:81
Calls fn, retrying on failure up to options.retryAttempts additional times with an
exponentially growing delay between attempts, before rethrowing the last error.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”() => Promise<T>
The operation to attempt.
options
Section titled “options”Retry attempt count, backoff configuration, and optional retry hooks.
attempt?
Section titled “attempt?”number = 0
The current attempt number, 0-indexed. Used internally for recursion.
Returns
Section titled “Returns”Promise<T>
The result of fn once it succeeds.