calculateBackoff
Defined in: packages/core/src/shared/utils/backoff.ts:41
Calculate the next run time using exponential backoff.
Formula: nextRunAt = now + (2^failCount × baseInterval)
Parameters
Section titled “Parameters”| Parameter | Type | Default value | Description |
|---|---|---|---|
failCount | number | undefined | Number of previous failed attempts |
baseInterval | number | DEFAULT_BASE_INTERVAL | Base interval in milliseconds (default: 1000ms) |
maxDelay? | number | undefined | Maximum delay in milliseconds (optional) |
Returns
Section titled “Returns”Date
The next run date