Skip to content

Commit

Permalink
fix: Allow removing maxRetryDelay from queue
Browse files Browse the repository at this point in the history
  • Loading branch information
danilofuchs committed Dec 12, 2024
1 parent 9904d7c commit 4fc34a0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/plans.js
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
8 changes: 4 additions & 4 deletions test/queueTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ describe('queues', function () {
const createProps = {
policy: 'standard',
retryLimit: 1,
retryBackoff: false,
retryBackoff: true,
retryDelay: 2,
maxRetryDelay: 3,
expireInSeconds: 4,
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit 4fc34a0

Please sign in to comment.