diff --git a/apps/worker/src/app/workflow/services/execution-log.worker.spec.ts b/apps/worker/src/app/workflow/services/execution-log.worker.spec.ts index f00a5f78983..5aa24125322 100644 --- a/apps/worker/src/app/workflow/services/execution-log.worker.spec.ts +++ b/apps/worker/src/app/workflow/services/execution-log.worker.spec.ts @@ -46,7 +46,7 @@ describe('ExecutionLog Worker', () => { expect(await executionLogWorker.bullMqService.getStatus()).to.deep.equal({ queueIsPaused: undefined, queueName: undefined, - workerName: 'execution-log', + workerName: 'execution-logs', workerIsPaused: false, workerIsRunning: true, }); @@ -60,13 +60,13 @@ describe('ExecutionLog Worker', () => { const existingJobs = await executionLogQueueService.queue.getJobs(); expect(existingJobs.length).to.equal(0); - const jobId = 'execution-log-queue-job-id'; - const _environmentId = 'execution-log-queue-environment-id'; - const _organizationId = 'execution-log-queue-organization-id'; - const _userId = 'execution-log-queue-user-id'; + const jobId = 'execution-logs-queue-job-id'; + const _environmentId = 'execution-logs-queue-environment-id'; + const _organizationId = 'execution-logs-queue-organization-id'; + const _userId = 'execution-logs-queue-user-id'; const jobData = { _id: jobId, - test: 'execution-log-queue-job-data', + test: 'execution-logs-queue-job-data', _environmentId, _organizationId, _userId, @@ -96,7 +96,7 @@ describe('ExecutionLog Worker', () => { expect(runningStatus).to.deep.equal({ queueIsPaused: undefined, queueName: undefined, - workerName: 'execution-log', + workerName: 'execution-logs', workerIsPaused: false, workerIsRunning: true, }); @@ -110,7 +110,7 @@ describe('ExecutionLog Worker', () => { expect(runningStatusChanged).to.deep.equal({ queueIsPaused: undefined, queueName: undefined, - workerName: 'execution-log', + workerName: 'execution-logs', workerIsPaused: true, workerIsRunning: true, }); @@ -126,7 +126,7 @@ describe('ExecutionLog Worker', () => { expect(runningStatus).to.deep.equal({ queueIsPaused: undefined, queueName: undefined, - workerName: 'execution-log', + workerName: 'execution-logs', workerIsPaused: true, workerIsRunning: true, }); @@ -140,7 +140,7 @@ describe('ExecutionLog Worker', () => { expect(runningStatusChanged).to.deep.equal({ queueIsPaused: undefined, queueName: undefined, - workerName: 'execution-log', + workerName: 'execution-logs', workerIsPaused: false, workerIsRunning: true, }); diff --git a/libs/shared/src/config/job-queue.ts b/libs/shared/src/config/job-queue.ts index 6171587e113..3250ed05436 100644 --- a/libs/shared/src/config/job-queue.ts +++ b/libs/shared/src/config/job-queue.ts @@ -1,5 +1,5 @@ export enum JobTopicNameEnum { - EXECUTION_LOG = 'execution-log', + EXECUTION_LOG = 'execution-logs', ACTIVE_JOBS_METRIC = 'metric-active-jobs', INBOUND_PARSE_MAIL = 'inbound-parse-mail', STANDARD = 'standard', @@ -8,10 +8,6 @@ export enum JobTopicNameEnum { PROCESS_SUBSCRIBER = 'process-subscriber', } -/* - * Name need to be in sync with the enum above as - * the name should be `EnumString-queue` for any queue name enums - */ export enum ObservabilityBackgroundTransactionEnum { JOB_PROCESSING_QUEUE = 'job-processing-queue', SUBSCRIBER_PROCESSING_QUEUE = 'subscriber-processing-queue', diff --git a/packages/application-generic/src/services/queues/execution-log-queue.service.spec.ts b/packages/application-generic/src/services/queues/execution-log-queue.service.spec.ts index 865d81c2876..ed7940d3363 100644 --- a/packages/application-generic/src/services/queues/execution-log-queue.service.spec.ts +++ b/packages/application-generic/src/services/queues/execution-log-queue.service.spec.ts @@ -38,10 +38,10 @@ describe('Execution Log Queue service', () => { ]) ); expect(executionLogQueueService.DEFAULT_ATTEMPTS).toEqual(3); - expect(executionLogQueueService.topic).toEqual('execution-log'); + expect(executionLogQueueService.topic).toEqual('execution-logs'); expect(await executionLogQueueService.bullMqService.getStatus()).toEqual({ queueIsPaused: false, - queueName: 'execution-log', + queueName: 'execution-logs', workerName: undefined, workerIsPaused: undefined, workerIsRunning: undefined, @@ -52,7 +52,7 @@ describe('Execution Log Queue service', () => { _events: {}, _eventsCount: 0, _maxListeners: undefined, - name: 'execution-log', + name: 'execution-logs', jobsOpts: { removeOnComplete: true, }, @@ -79,7 +79,7 @@ describe('Execution Log Queue service', () => { it('should have prefix in cluster mode', async () => { expect(executionLogQueueService.queue.opts.prefix).toEqual( - '{execution-log}' + '{execution-logs}' ); }); });