Retention parameters for pruneEscalations. Prunes only terminal rows (resolved/cancelled/expired) — the statuses every engine state transition treats as final — older than the given horizon.

interface PruneEscalationsParams {
    limit?: number;
    namespace?: string;
    olderThan: string;
    statuses?: ("resolved" | "cancelled" | "expired")[];
}

Properties

limit?: number

Max rows deleted per call (bounds lock time and vacuum pressure). Default 10,000, capped at 100,000. Loop until deleted is 0 to drain.

namespace?: string
olderThan: string

Age horizon as a Postgres interval string (e.g. '90 days', '12 hours'). Rows qualify when updated_at < NOW() - olderThan.

statuses?: ("resolved" | "cancelled" | "expired")[]

Terminal statuses to prune. Defaults to all three; non-terminal values are ignored.