From 4fc34a0e2926efda43af85d773ade7ddae2be3e2 Mon Sep 17 00:00:00 2001 From: Danilo Fuchs Date: Thu, 12 Dec 2024 15:11:35 -0300 Subject: [PATCH] fix: Allow removing maxRetryDelay from queue --- src/plans.js | 2 +- test/queueTest.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/plans.js b/src/plans.js index 99167cb..5588969 100644 --- a/src/plans.js +++ b/src/plans.js @@ -395,7 +395,7 @@ function updateQueue (schema) { retry_limit = COALESCE($3, retry_limit), retry_delay = COALESCE($4, retry_delay), retry_backoff = COALESCE($5, retry_backoff), - max_retry_delay = COALESCE($6, max_retry_delay), + max_retry_delay = $6, expire_seconds = COALESCE($7, expire_seconds), retention_minutes = COALESCE($8, retention_minutes), dead_letter = COALESCE($9, dead_letter), diff --git a/test/queueTest.js b/test/queueTest.js index 27cdaf8..b932b0a 100644 --- a/test/queueTest.js +++ b/test/queueTest.js @@ -131,7 +131,7 @@ describe('queues', function () { const createProps = { policy: 'standard', retryLimit: 1, - retryBackoff: false, + retryBackoff: true, retryDelay: 2, maxRetryDelay: 3, expireInSeconds: 4, @@ -161,9 +161,9 @@ describe('queues', function () { const updateProps = { policy: 'short', retryLimit: 1, - retryBackoff: true, + retryBackoff: false, retryDelay: 2, - maxRetryDelay: 3, + maxRetryDelay: undefined, expireInSeconds: 4, retentionMinutes: 5, deadLetter @@ -177,7 +177,7 @@ describe('queues', function () { assert.strictEqual(updateProps.retryLimit, queueObj.retryLimit) assert.strictEqual(updateProps.retryBackoff, queueObj.retryBackoff) assert.strictEqual(updateProps.retryDelay, queueObj.retryDelay) - assert.strictEqual(updateProps.maxRetryDelay, queueObj.maxRetryDelay) + assert.strictEqual(null, queueObj.maxRetryDelay) assert.strictEqual(updateProps.expireInSeconds, queueObj.expireInSeconds) assert.strictEqual(updateProps.retentionMinutes, queueObj.retentionMinutes) assert.strictEqual(updateProps.deadLetter, queueObj.deadLetter)