ExternalLinkRetryOptions
How collectBrokenExternalLinks retries a transient failure: a network failure, an HTTP 429 or an HTTP 5xx.
Each wait doubles from ExternalLinkRetryOptions.initialDelayInMilliseconds up to ExternalLinkRetryOptions.maxDelayInMilliseconds, is jittered into its upper half, and is never shorter than the server’s Retry-After. The waits of one URL never add up to more than ExternalLinkRetryOptions.totalBudgetInMilliseconds; the status of the last attempt is final.
Import:
import type { ExternalLinkRetryOptions } from '@mnaoumov/typescript-dev-toolkit/docs-site/link-check';Signature:
export interface ExternalLinkRetryOptionsProperties
| Property | Type | Description |
|---|---|---|
| initialDelayInMilliseconds? | number | The first wait. Defaults to DEFAULT_EXTERNAL_LINK_RETRY_INITIAL_DELAY_IN_MILLISECONDS. |
| maxDelayInMilliseconds? | number | The longest single wait the backoff grows to. Defaults to DEFAULT_EXTERNAL_LINK_RETRY_MAX_DELAY_IN_MILLISECONDS. |
| random? | () => number | Returns a number in [0, 1) for the jitter. Defaults to Math.random. |
| sleep? | (milliseconds: number) => Promise<void> | Waits the given time. Defaults to a setTimeout. |
| totalBudgetInMilliseconds? | number | The most one URL may spend waiting between its attempts. Defaults to DEFAULT_EXTERNAL_LINK_RETRY_TOTAL_BUDGET_IN_MILLISECONDS. |
Links to this page: