diff --git a/packages/void/src/cli/deploy-helpers.ts b/packages/void/src/cli/deploy-helpers.ts index 493719edf..81b9df40b 100644 --- a/packages/void/src/cli/deploy-helpers.ts +++ b/packages/void/src/cli/deploy-helpers.ts @@ -539,6 +539,8 @@ export function toManifestSchedulesAndQueues( bindingName: q.bindingName, ...(q.maxBatchSize != null && { maxBatchSize: q.maxBatchSize }), ...(q.maxBatchTimeout != null && { maxBatchTimeout: q.maxBatchTimeout }), + ...(q.maxRetries != null && { maxRetries: q.maxRetries }), + ...(q.retryDelay != null && { retryDelay: q.retryDelay }), })), }; } diff --git a/packages/void/test/unit/deploy-project.test.ts b/packages/void/test/unit/deploy-project.test.ts index 0fb5cab3b..028b263aa 100644 --- a/packages/void/test/unit/deploy-project.test.ts +++ b/packages/void/test/unit/deploy-project.test.ts @@ -14,6 +14,7 @@ import { resolveFullDeployBuildCommand, resolveStaticDeployPreset, resolveStaticBuildCommand, + toManifestSchedulesAndQueues, } from '../../src/cli/deploy-helpers.ts'; import { formatProjectCommand, @@ -557,3 +558,35 @@ describe('generateDeployWrapperIfNeeded', () => { expect(handler).toContain('VALUES ($1, $2)'); }); }); + +describe('toManifestSchedulesAndQueues', () => { + it('keeps queue retry options, including zero', () => { + const { queues } = toManifestSchedulesAndQueues( + [], + [ + { + filePath: 'emails.ts', + name: 'emails', + bindingName: 'QUEUE_EMAILS', + maxBatchSize: 50, + maxBatchTimeout: 10, + maxRetries: 0, + retryDelay: 30, + }, + { filePath: 'jobs.ts', name: 'jobs', bindingName: 'QUEUE_JOBS' }, + ], + ); + expect(queues).toEqual([ + { + name: 'emails', + bindingName: 'QUEUE_EMAILS', + maxBatchSize: 50, + maxBatchTimeout: 10, + maxRetries: 0, + retryDelay: 30, + }, + { name: 'jobs', bindingName: 'QUEUE_JOBS' }, + ]); + expect(Object.keys(queues[1]!)).toEqual(['name', 'bindingName']); + }); +});