From 4a32476f327cde05fe275205c0b78c498608e73d Mon Sep 17 00:00:00 2001 From: fenos Date: Wed, 3 Jul 2024 16:20:47 +0200 Subject: [PATCH] fix: queue optional delete params --- 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,