From c19edde2bdea8d132fa484eaae5d366b7916470a Mon Sep 17 00:00:00 2001 From: Fabrizio Date: Wed, 3 Jul 2024 16:32:34 +0200 Subject: [PATCH] fix: queue optional delete params (#514) --- src/internal/queue/queue.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/internal/queue/queue.ts b/src/internal/queue/queue.ts index da3c2b4d..4cd5e264 100644 --- a/src/internal/queue/queue.ts +++ b/src/internal/queue/queue.ts @@ -66,7 +66,7 @@ export abstract class Queue { statement_timeout: pgQueueReadWriteTimeout > 0 ? pgQueueReadWriteTimeout : undefined, }), application_name: 'storage-pgboss', - deleteAfterDays: pgQueueDeleteAfterHours ? undefined : pgQueueDeleteAfterDays, + ...(pgQueueDeleteAfterHours ? {} : { deleteAfterDays: pgQueueDeleteAfterDays }), ...(pgQueueDeleteAfterHours ? { deleteAfterHours: pgQueueDeleteAfterHours } : {}), archiveCompletedAfterSeconds: pgQueueArchiveCompletedAfterSeconds, retentionDays: pgQueueRetentionDays,