type alias RetryDelay

Milliseconds to wait before the next attempt, or a function of the attempt just finished — the shape lib/job converged on for Oban-style backoff, with a constant as its degenerate case. (n) => Math.min(100 * 2 ** n, 30_000) is exponential; () => 100 is fixed.

Definition

number | ((attempt: number) => number)

Usage

import { type RetryDelay } from "lib/task/task.ts";