Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

docs(webhook): describe what the failure retention job prunes

Yudhi Armyndharis746f3cf54ae3
diff --git a/src/modules/webhook/webhook.service.ts b/src/modules/webhook/webhook.service.ts
index 9b0416402..81d52ed91 100644
--- a/src/modules/webhook/webhook.service.ts
+++ b/src/modules/webhook/webhook.service.ts
@@ -56,9 +56,9 @@ export class WebhookService implements OnModuleInit, OnModuleDestroy {
/**
* Periodically prune webhook_delivery_failures older than WEBHOOK_FAILURE_RETENTION_DAYS
- * (default 90; set <= 0 to disable). Runs once at startup, then daily. The table is an append-only
- * log written on every terminally-failed delivery, so without this it grows without bound under a
- * receiver outage. (Mirrors AuditService's audit-log retention.)
+ * (default 90; set <= 0 to disable). Runs once at startup, then daily. The table records every
+ * failed or unsent delivery (a later successful delivery removes its row), so without this it grows
+ * without bound under a receiver outage. (Mirrors AuditService's audit-log retention.)
*/
onModuleInit(): void {
const parsed = Number.parseInt(process.env.WEBHOOK_FAILURE_RETENTION_DAYS ?? '', 10);