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,