From e8a8f8068eba5e0307209264ad5f9cfb7a807266 Mon Sep 17 00:00:00 2001 From: mhuseinov <61513701+mhuseinov@users.noreply.github.com> Date: Tue, 19 Sep 2023 11:38:39 -0700 Subject: [PATCH] migrate from bull to BullMQ (#984) migrate from bull -> BullMQ update all local jobs to support BullMQ update Redis configuration to work with new BullMQ --- .../alcs/src/queues/bullConfig.service.ts | 20 +- .../application-expiry.consumer.spec.ts | 4 +- .../application-expiry.consumer.ts | 16 +- .../status-emails.consumer.spec.ts | 6 +- .../status-emails/status-emails.consumer.ts | 18 +- .../cleanUpNotifications.consumer.spec.ts | 2 +- .../cleanUpNotifications.consumer.ts | 16 +- .../status-emails.consumer.spec.ts | 4 +- .../status-emails.consumer.ts | 18 +- .../src/queues/scheduler/scheduler.module.ts | 2 +- .../scheduler/scheduler.service.spec.ts | 30 +- .../src/queues/scheduler/scheduler.service.ts | 34 +- services/config/default.json | 4 +- services/config/test.json | 5 + .../libs/common/src/redis/redis.service.ts | 9 +- services/package-lock.json | 404 +++++++----------- services/package.json | 4 +- 17 files changed, 284 insertions(+), 312 deletions(-) diff --git a/services/apps/alcs/src/queues/bullConfig.service.ts b/services/apps/alcs/src/queues/bullConfig.service.ts index a729709bce..2a9f8ee66e 100644 --- a/services/apps/alcs/src/queues/bullConfig.service.ts +++ b/services/apps/alcs/src/queues/bullConfig.service.ts @@ -1,18 +1,22 @@ -import { CONFIG_TOKEN } from '@app/common/config/config.module'; -import { - BullModuleOptions, - SharedBullConfigurationFactory, -} from '@nestjs/bull'; +import { SharedBullConfigurationFactory } from '@nestjs/bullmq'; import { Inject, Injectable } from '@nestjs/common'; -import { IConfig } from 'config'; +import { QueueOptions } from 'bullmq'; +import { + CONFIG_TOKEN, + IConfig, +} from '../../../../libs/common/src/config/config.module'; @Injectable() export class BullConfigService implements SharedBullConfigurationFactory { constructor(@Inject(CONFIG_TOKEN) private config: IConfig) {} - createSharedConfiguration(): BullModuleOptions { + createSharedConfiguration(): QueueOptions { return { - url: this.config.get('REDIS.URL'), + connection: { + host: this.config.get('REDIS.HOST'), + port: this.config.get('REDIS.PORT'), + password: this.config.get('REDIS.PASSWORD'), + }, }; } } diff --git a/services/apps/alcs/src/queues/scheduler/application/application-expiry/application-expiry.consumer.spec.ts b/services/apps/alcs/src/queues/scheduler/application/application-expiry/application-expiry.consumer.spec.ts index 5c91339a98..2561f4bdaf 100644 --- a/services/apps/alcs/src/queues/scheduler/application/application-expiry/application-expiry.consumer.spec.ts +++ b/services/apps/alcs/src/queues/scheduler/application/application-expiry/application-expiry.consumer.spec.ts @@ -57,7 +57,7 @@ describe('SchedulerConsumerService', () => { subject: 'Applications near expiry', }; - await applicationExpiryConsumer.applicationExpiry(); + await applicationExpiryConsumer.process(); expect(mockApplicationService.getAllNearExpiryDates).toBeCalledTimes(1); expect(mockEmailService.sendEmail).toBeCalledTimes(1); @@ -69,7 +69,7 @@ describe('SchedulerConsumerService', () => { it('should not send email if no application near expiry', async () => { mockApplicationService.getAllNearExpiryDates.mockResolvedValue([]); - await applicationExpiryConsumer.applicationExpiry(); + await applicationExpiryConsumer.process(); expect(mockApplicationService.getAllNearExpiryDates).toBeCalledTimes(1); expect(mockEmailService.sendEmail).toBeCalledTimes(0); diff --git a/services/apps/alcs/src/queues/scheduler/application/application-expiry/application-expiry.consumer.ts b/services/apps/alcs/src/queues/scheduler/application/application-expiry/application-expiry.consumer.ts index 9e90de5bb5..5b85729026 100644 --- a/services/apps/alcs/src/queues/scheduler/application/application-expiry/application-expiry.consumer.ts +++ b/services/apps/alcs/src/queues/scheduler/application/application-expiry/application-expiry.consumer.ts @@ -1,5 +1,5 @@ import { CONFIG_TOKEN, IConfig } from '@app/common/config/config.module'; -import { Process, Processor } from '@nestjs/bull'; +import { OnWorkerEvent, Processor, WorkerHost } from '@nestjs/bullmq'; import { Inject, Logger } from '@nestjs/common'; import * as dayjs from 'dayjs'; import { @@ -10,17 +10,18 @@ import { EmailService } from '../../../../providers/email/email.service'; import { QUEUES } from '../../scheduler.service'; @Processor(QUEUES.APP_EXPIRY) -export class ApplicationExpiryConsumer { +export class ApplicationExpiryConsumer extends WorkerHost { private logger = new Logger(ApplicationExpiryConsumer.name); constructor( private applicationService: ApplicationService, private emailService: EmailService, @Inject(CONFIG_TOKEN) private config: IConfig, - ) {} + ) { + super(); + } - @Process() - async applicationExpiry() { + async process() { try { this.logger.debug('starting applicationExpiry'); @@ -50,6 +51,11 @@ export class ApplicationExpiryConsumer { } } + @OnWorkerEvent('completed') + onCompleted() { + this.logger.debug('Completed applicationExpiry job.'); + } + private getApplicationsNearExpiryDates() { const startDate = dayjs().add(-90, 'day'); const endDate = dayjs().add( diff --git a/services/apps/alcs/src/queues/scheduler/application/status-emails/status-emails.consumer.spec.ts b/services/apps/alcs/src/queues/scheduler/application/status-emails/status-emails.consumer.spec.ts index 962fe80a5a..7d74caf467 100644 --- a/services/apps/alcs/src/queues/scheduler/application/status-emails/status-emails.consumer.spec.ts +++ b/services/apps/alcs/src/queues/scheduler/application/status-emails/status-emails.consumer.spec.ts @@ -68,7 +68,7 @@ describe('ApplicationSubmissionStatusEmailConsumer', () => { }); mockStatusEmailService.sendApplicationStatusEmail.mockResolvedValue(); - await consumer.processSubmissionStatusesAndSendEmails(); + await consumer.process(); expect( mockApplicationSubmissionStatusService.getSubmissionToSubmissionStatusForSendingEmails, @@ -119,7 +119,7 @@ describe('ApplicationSubmissionStatusEmailConsumer', () => { }); mockStatusEmailService.sendApplicationStatusEmail.mockResolvedValue(); - await consumer.processSubmissionStatusesAndSendEmails(); + await consumer.process(); expect( mockApplicationSubmissionStatusService.getSubmissionToSubmissionStatusForSendingEmails, @@ -169,7 +169,7 @@ describe('ApplicationSubmissionStatusEmailConsumer', () => { }); mockStatusEmailService.sendApplicationStatusEmail.mockResolvedValue(); - await consumer.processSubmissionStatusesAndSendEmails(); + await consumer.process(); expect( mockApplicationSubmissionStatusService.getSubmissionToSubmissionStatusForSendingEmails, diff --git a/services/apps/alcs/src/queues/scheduler/application/status-emails/status-emails.consumer.ts b/services/apps/alcs/src/queues/scheduler/application/status-emails/status-emails.consumer.ts index 400069811b..0a7d8df797 100644 --- a/services/apps/alcs/src/queues/scheduler/application/status-emails/status-emails.consumer.ts +++ b/services/apps/alcs/src/queues/scheduler/application/status-emails/status-emails.consumer.ts @@ -1,4 +1,4 @@ -import { Process, Processor } from '@nestjs/bull'; +import { OnWorkerEvent, Processor, WorkerHost } from '@nestjs/bullmq'; import { Logger } from '@nestjs/common'; import * as dayjs from 'dayjs'; import * as timezone from 'dayjs/plugin/timezone'; @@ -19,16 +19,17 @@ dayjs.extend(utc); dayjs.extend(timezone); @Processor(QUEUES.APPLICATION_STATUS_EMAILS) -export class ApplicationSubmissionStatusEmailConsumer { +export class ApplicationSubmissionStatusEmailConsumer extends WorkerHost { private logger = new Logger(ApplicationSubmissionStatusEmailConsumer.name); constructor( private submissionStatusService: ApplicationSubmissionStatusService, private statusEmailService: StatusEmailService, - ) {} + ) { + super(); + } - @Process() - async processSubmissionStatusesAndSendEmails() { + async process() { try { this.logger.debug( 'Starting application submission status email consumer.', @@ -71,6 +72,13 @@ export class ApplicationSubmissionStatusEmailConsumer { } } + @OnWorkerEvent('completed') + onCompleted() { + this.logger.debug( + 'Completed ApplicationSubmissionStatusEmailConsumer job.', + ); + } + private async sendEmailAndUpdateStatus( applicationSubmission: ApplicationSubmission, submissionGovernment: LocalGovernment | null, diff --git a/services/apps/alcs/src/queues/scheduler/cleanUpNotifications.consumer.spec.ts b/services/apps/alcs/src/queues/scheduler/cleanUpNotifications.consumer.spec.ts index 1ff6aeb03b..206aea8c70 100644 --- a/services/apps/alcs/src/queues/scheduler/cleanUpNotifications.consumer.spec.ts +++ b/services/apps/alcs/src/queues/scheduler/cleanUpNotifications.consumer.spec.ts @@ -37,7 +37,7 @@ describe('SchedulerConsumerService', () => { affected: 1, } as DeleteResult); - await notificationCleanUpConsumer.cleanUpNotifications(); + await notificationCleanUpConsumer.process(); expect(mockNotificationService.cleanUp).toHaveBeenCalledTimes(2); diff --git a/services/apps/alcs/src/queues/scheduler/cleanUpNotifications.consumer.ts b/services/apps/alcs/src/queues/scheduler/cleanUpNotifications.consumer.ts index 0078c2234b..f16954cafc 100644 --- a/services/apps/alcs/src/queues/scheduler/cleanUpNotifications.consumer.ts +++ b/services/apps/alcs/src/queues/scheduler/cleanUpNotifications.consumer.ts @@ -1,4 +1,4 @@ -import { Process, Processor } from '@nestjs/bull'; +import { OnWorkerEvent, Processor, WorkerHost } from '@nestjs/bullmq'; import { Logger } from '@nestjs/common'; import * as dayjs from 'dayjs'; import { MessageService } from '../../alcs/message/message.service'; @@ -8,13 +8,14 @@ const DAYS_TO_RETAIN_READ = 30; const DAYS_TO_RETAIN_UNREAD = 365; @Processor(QUEUES.CLEANUP_NOTIFICATIONS) -export class CleanUpNotificationsConsumer { +export class CleanUpNotificationsConsumer extends WorkerHost { private logger = new Logger(CleanUpNotificationsConsumer.name); - constructor(private notificationService: MessageService) {} + constructor(private notificationService: MessageService) { + super(); + } - @Process() - async cleanUpNotifications() { + async process() { try { this.logger.debug('starting notification cleanup'); @@ -43,4 +44,9 @@ export class CleanUpNotificationsConsumer { } return; } + + @OnWorkerEvent('completed') + onCompleted() { + this.logger.debug('Completed CleanUpNotificationsConsumer job.'); + } } diff --git a/services/apps/alcs/src/queues/scheduler/notice-of-intent/status-emails.consumer.spec.ts b/services/apps/alcs/src/queues/scheduler/notice-of-intent/status-emails.consumer.spec.ts index 76a1c14940..53499d2771 100644 --- a/services/apps/alcs/src/queues/scheduler/notice-of-intent/status-emails.consumer.spec.ts +++ b/services/apps/alcs/src/queues/scheduler/notice-of-intent/status-emails.consumer.spec.ts @@ -66,7 +66,7 @@ describe('NoticeOfIntentSubmissionStatusEmailConsumer', () => { }); mockStatusEmailService.sendNoticeOfIntentStatusEmail.mockResolvedValue(); - await consumer.processSubmissionStatusesAndSendEmails(); + await consumer.process(); expect( mockNoticeOfIntentSubmissionStatusService.getSubmissionToSubmissionStatusForSendingEmails, @@ -119,7 +119,7 @@ describe('NoticeOfIntentSubmissionStatusEmailConsumer', () => { }); mockStatusEmailService.sendNoticeOfIntentStatusEmail.mockResolvedValue(); - await consumer.processSubmissionStatusesAndSendEmails(); + await consumer.process(); expect( mockNoticeOfIntentSubmissionStatusService.getSubmissionToSubmissionStatusForSendingEmails, diff --git a/services/apps/alcs/src/queues/scheduler/notice-of-intent/status-emails.consumer.ts b/services/apps/alcs/src/queues/scheduler/notice-of-intent/status-emails.consumer.ts index 20e198d3bf..e2842a2be1 100644 --- a/services/apps/alcs/src/queues/scheduler/notice-of-intent/status-emails.consumer.ts +++ b/services/apps/alcs/src/queues/scheduler/notice-of-intent/status-emails.consumer.ts @@ -1,4 +1,4 @@ -import { Process, Processor } from '@nestjs/bull'; +import { OnWorkerEvent, Processor, WorkerHost } from '@nestjs/bullmq'; import { Logger } from '@nestjs/common'; import * as dayjs from 'dayjs'; import * as timezone from 'dayjs/plugin/timezone'; @@ -15,16 +15,17 @@ dayjs.extend(utc); dayjs.extend(timezone); @Processor(QUEUES.NOTICE_OF_INTENTS_STATUS_EMAILS) -export class NoticeOfIntentSubmissionStatusEmailConsumer { +export class NoticeOfIntentSubmissionStatusEmailConsumer extends WorkerHost { private logger = new Logger(NoticeOfIntentSubmissionStatusEmailConsumer.name); constructor( private submissionStatusService: NoticeOfIntentSubmissionStatusService, private statusEmailService: StatusEmailService, - ) {} + ) { + super(); + } - @Process() - async processSubmissionStatusesAndSendEmails() { + async process() { try { const tomorrow = dayjs(new Date()) .tz('Canada/Pacific') @@ -69,6 +70,13 @@ export class NoticeOfIntentSubmissionStatusEmailConsumer { } } + @OnWorkerEvent('completed') + onCompleted() { + this.logger.debug( + 'Completed NoticeOfIntentSubmissionStatusEmailConsumer job.', + ); + } + private async updateSubmissionStatus( submissionStatus: NoticeOfIntentSubmissionToSubmissionStatus, today: Date, diff --git a/services/apps/alcs/src/queues/scheduler/scheduler.module.ts b/services/apps/alcs/src/queues/scheduler/scheduler.module.ts index 4f113b6778..4cd660e0bd 100644 --- a/services/apps/alcs/src/queues/scheduler/scheduler.module.ts +++ b/services/apps/alcs/src/queues/scheduler/scheduler.module.ts @@ -1,4 +1,4 @@ -import { BullModule } from '@nestjs/bull'; +import { BullModule } from '@nestjs/bullmq'; import { Module, OnApplicationBootstrap } from '@nestjs/common'; import { ApplicationSubmissionStatusModule } from '../../alcs/application/application-submission-status/application-submission-status.module'; import { ApplicationModule } from '../../alcs/application/application.module'; diff --git a/services/apps/alcs/src/queues/scheduler/scheduler.service.spec.ts b/services/apps/alcs/src/queues/scheduler/scheduler.service.spec.ts index c2ea9de4d8..2d6edada8c 100644 --- a/services/apps/alcs/src/queues/scheduler/scheduler.service.spec.ts +++ b/services/apps/alcs/src/queues/scheduler/scheduler.service.spec.ts @@ -1,5 +1,5 @@ import { ConfigModule } from '@app/common/config/config.module'; -import { BullModule, getQueueToken } from '@nestjs/bull'; +import { BullModule, getQueueToken } from '@nestjs/bullmq'; import { Test, TestingModule } from '@nestjs/testing'; import { BullConfigService } from '../bullConfig.service'; import { @@ -20,25 +20,25 @@ describe('SchedulerService', () => { mockAppExpiryQueue = { add: jest.fn(), process: jest.fn(), - empty: jest.fn(), + drain: jest.fn(), }; mockNotificationCleanUpQueue = { add: jest.fn(), process: jest.fn(), - empty: jest.fn(), + drain: jest.fn(), }; mockApplicationStatusEmailsQueue = { add: jest.fn(), process: jest.fn(), - empty: jest.fn(), + drain: jest.fn(), }; mockNoticeOfIntentStatusEmailsQueue = { add: jest.fn(), process: jest.fn(), - empty: jest.fn(), + drain: jest.fn(), }; const module: TestingModule = await Test.createTestingModule({ @@ -80,41 +80,45 @@ describe('SchedulerService', () => { //Job Disabled for now // it('should call add for scheduleApplicationExpiry', async () => { // await schedulerService.setup(); - // expect(mockAppExpiryQueue.empty).toBeCalledTimes(1); + // expect(mockAppExpiryQueue.drain).toBeCalledTimes(1); // expect(mockAppExpiryQueue.add).toBeCalledTimes(1); // expect(mockAppExpiryQueue.add).toBeCalledWith( + // 'applicationExpiry' // {}, - // { repeat: { cron: MONDAY_TO_FRIDAY_AT_2AM } }, + // { repeat: { pattern: MONDAY_TO_FRIDAY_AT_2AM } }, // ); // }); it('should call add for notification cleanup', async () => { await schedulerService.setup(); - expect(mockNotificationCleanUpQueue.empty).toBeCalledTimes(1); + expect(mockNotificationCleanUpQueue.drain).toBeCalledTimes(1); expect(mockNotificationCleanUpQueue.add).toBeCalledTimes(1); expect(mockNotificationCleanUpQueue.add).toBeCalledWith( + 'cleanupNotifications', {}, - { repeat: { cron: EVERYDAY_MIDNIGHT } }, + { repeat: { pattern: EVERYDAY_MIDNIGHT } }, ); }); it('should call add for application status email', async () => { await schedulerService.setup(); - expect(mockApplicationStatusEmailsQueue.empty).toBeCalledTimes(1); + expect(mockApplicationStatusEmailsQueue.drain).toBeCalledTimes(1); expect(mockApplicationStatusEmailsQueue.add).toBeCalledTimes(1); expect(mockApplicationStatusEmailsQueue.add).toBeCalledWith( + 'applicationSubmissionStatusEmails', {}, - { repeat: { cron: EVERY_15_MINUTES_STARTING_FROM_8AM } }, + { repeat: { pattern: EVERY_15_MINUTES_STARTING_FROM_8AM } }, ); }); it('should call add for notice of intent status email', async () => { await schedulerService.setup(); - expect(mockNoticeOfIntentStatusEmailsQueue.empty).toBeCalledTimes(1); + expect(mockNoticeOfIntentStatusEmailsQueue.drain).toBeCalledTimes(1); expect(mockNoticeOfIntentStatusEmailsQueue.add).toBeCalledTimes(1); expect(mockNoticeOfIntentStatusEmailsQueue.add).toBeCalledWith( + 'noticeOfIntentSubmissionStatusEmails', {}, - { repeat: { cron: EVERY_15_MINUTES_STARTING_FROM_8AM } }, + { repeat: { pattern: EVERY_15_MINUTES_STARTING_FROM_8AM } }, ); }); }); diff --git a/services/apps/alcs/src/queues/scheduler/scheduler.service.ts b/services/apps/alcs/src/queues/scheduler/scheduler.service.ts index 1fef60a1d7..856cdc258f 100644 --- a/services/apps/alcs/src/queues/scheduler/scheduler.service.ts +++ b/services/apps/alcs/src/queues/scheduler/scheduler.service.ts @@ -1,10 +1,10 @@ -import { InjectQueue } from '@nestjs/bull'; +import { InjectQueue } from '@nestjs/bullmq'; import { Injectable } from '@nestjs/common'; -import { Queue } from 'bull'; +import { Queue } from 'bullmq'; export const MONDAY_TO_FRIDAY_AT_2AM = '0 0 2 * * 1-5'; export const EVERYDAY_MIDNIGHT = '0 0 0 * * *'; -export const EVERY_15_MINUTES_STARTING_FROM_8AM = '0/15 8-23 * * *'; +export const EVERY_15_MINUTES_STARTING_FROM_8AM = '0/1 8-23 * * *'; export const QUEUES = { APP_EXPIRY: 'ApplicationExpiry', @@ -27,7 +27,7 @@ export class SchedulerService { async setup() { //Job Disabled, clean queue but don't schedule it - await this.applicationExpiryQueue.empty(); + await this.applicationExpiryQueue.drain(); // await this.scheduleApplicationExpiry(); await this.scheduleCleanupNotifications(); @@ -36,32 +36,42 @@ export class SchedulerService { } private async scheduleApplicationExpiry() { - await this.applicationExpiryQueue.empty(); + await this.applicationExpiryQueue.drain(); await this.applicationExpiryQueue.add( + 'applicationExpiry', {}, - { repeat: { cron: MONDAY_TO_FRIDAY_AT_2AM } }, + { + repeat: { pattern: MONDAY_TO_FRIDAY_AT_2AM }, + }, ); } private async scheduleCleanupNotifications() { - await this.cleanupNotificationsQueue.empty(); + await this.cleanupNotificationsQueue.drain(); await this.cleanupNotificationsQueue.add( + 'cleanupNotifications', {}, - { repeat: { cron: EVERYDAY_MIDNIGHT } }, + { + repeat: { pattern: EVERYDAY_MIDNIGHT }, + }, ); } private async scheduleSubmissionEmails() { - await this.applicationSubmissionStatusEmails.empty(); + await this.applicationSubmissionStatusEmails.drain(); await this.applicationSubmissionStatusEmails.add( + 'applicationSubmissionStatusEmails', {}, - { repeat: { cron: EVERY_15_MINUTES_STARTING_FROM_8AM } }, + { + repeat: { pattern: EVERY_15_MINUTES_STARTING_FROM_8AM }, + }, ); - await this.noticeOfIntentSubmissionStatusEmails.empty(); + await this.noticeOfIntentSubmissionStatusEmails.drain(); await this.noticeOfIntentSubmissionStatusEmails.add( + 'noticeOfIntentSubmissionStatusEmails', {}, - { repeat: { cron: EVERY_15_MINUTES_STARTING_FROM_8AM } }, + { repeat: { pattern: EVERY_15_MINUTES_STARTING_FROM_8AM } }, ); } } diff --git a/services/config/default.json b/services/config/default.json index baa256c5f0..9e5d48ec20 100644 --- a/services/config/default.json +++ b/services/config/default.json @@ -55,7 +55,9 @@ "MAX_FILE_SIZE": 104857600 }, "REDIS": { - "URL": "redis://:redis@redis:6379" + "HOST": "localhost", + "PORT": "6379", + "PASSWORD": "" }, "EMAIL": { "DEFAULT_ADMINS": [""] diff --git a/services/config/test.json b/services/config/test.json index 57219d2a5c..88035fd760 100644 --- a/services/config/test.json +++ b/services/config/test.json @@ -8,6 +8,11 @@ "USER": "postgres", "PASSWORD": "postgres" }, + "REDIS": { + "HOST": "localhost", + "PORT": "6379", + "PASSWORD": "redis" + }, "VERBOSE": "false", "KEYCLOAK": { "SCOPES": ["openid"] diff --git a/services/libs/common/src/redis/redis.service.ts b/services/libs/common/src/redis/redis.service.ts index 7e5ad639db..194f9c7311 100644 --- a/services/libs/common/src/redis/redis.service.ts +++ b/services/libs/common/src/redis/redis.service.ts @@ -8,9 +8,16 @@ export class RedisService { private client: ReturnType; constructor(@Inject(CONFIG_TOKEN) private config: IConfig) { + const url = `redis://:${this.config.get( + 'REDIS.PASSWORD', + )}@${this.config.get('REDIS.HOST')}:${this.config.get( + 'REDIS.PORT', + )}`; + const client = createClient({ - url: this.config.get('REDIS.URL'), + url, }); + client.on('error', (err) => this.logger.error('Redis Client Error', err)); client.connect().then(() => { this.client = client; diff --git a/services/package-lock.json b/services/package-lock.json index dc938a13d2..8f6167b8a9 100644 --- a/services/package-lock.json +++ b/services/package-lock.json @@ -21,7 +21,7 @@ "@grpc/grpc-js": "^1.8.7", "@grpc/proto-loader": "^0.7.4", "@nestjs/axios": "^0.1.1", - "@nestjs/bull": "^0.6.2", + "@nestjs/bullmq": "^10.0.1", "@nestjs/common": "^9.3.1", "@nestjs/config": "^2.3.0", "@nestjs/core": "^9.3.1", @@ -29,7 +29,6 @@ "@nestjs/platform-fastify": "^9.3.1", "@nestjs/swagger": "^6.1.4", "@nestjs/typeorm": "^9.0.1", - "bull": "^4.10.2", "class-transformer": "^0.5.1", "class-validator": "^0.14.0", "config": "^3.3.9", @@ -61,7 +60,6 @@ "@nestjs/cli": "^9.1.9", "@nestjs/schematics": "^9.0.4", "@nestjs/testing": "^9.3.1", - "@types/bull": "^3.15.9", "@types/config": "^0.0.41", "@types/express": "^4.17.16", "@types/jest": "28.1.4", @@ -2497,7 +2495,8 @@ "node_modules/@ioredis/commands": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@ioredis/commands/-/commands-1.2.0.tgz", - "integrity": "sha512-Sx1pU8EM64o2BrqNpEO1CNLtKQwyhuXuqyfH7oGKCk+1a33d2r5saW8zNwm3j6BTExtjrv2BxTgzzkMwts6vGg==" + "integrity": "sha512-Sx1pU8EM64o2BrqNpEO1CNLtKQwyhuXuqyfH7oGKCk+1a33d2r5saW8zNwm3j6BTExtjrv2BxTgzzkMwts6vGg==", + "peer": true }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", @@ -3083,7 +3082,8 @@ "optional": true, "os": [ "darwin" - ] + ], + "peer": true }, "node_modules/@msgpackr-extract/msgpackr-extract-darwin-x64": { "version": "3.0.0", @@ -3095,7 +3095,8 @@ "optional": true, "os": [ "darwin" - ] + ], + "peer": true }, "node_modules/@msgpackr-extract/msgpackr-extract-linux-arm": { "version": "3.0.0", @@ -3107,7 +3108,8 @@ "optional": true, "os": [ "linux" - ] + ], + "peer": true }, "node_modules/@msgpackr-extract/msgpackr-extract-linux-arm64": { "version": "3.0.0", @@ -3119,7 +3121,8 @@ "optional": true, "os": [ "linux" - ] + ], + "peer": true }, "node_modules/@msgpackr-extract/msgpackr-extract-linux-x64": { "version": "3.0.0", @@ -3131,7 +3134,8 @@ "optional": true, "os": [ "linux" - ] + ], + "peer": true }, "node_modules/@msgpackr-extract/msgpackr-extract-win32-x64": { "version": "3.0.0", @@ -3143,7 +3147,8 @@ "optional": true, "os": [ "win32" - ] + ], + "peer": true }, "node_modules/@nestjs/axios": { "version": "0.1.1", @@ -3158,42 +3163,32 @@ "rxjs": "^6.0.0 || ^7.0.0" } }, - "node_modules/@nestjs/bull": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/@nestjs/bull/-/bull-0.6.2.tgz", - "integrity": "sha512-tx5wiIGgfYEj5RAJA1B23pn/63nsmMH0f981V1/v3NKyE07NsvOXCrwKNGQnIZZlXkXh7lgx2I80/tYwPGnVIg==", + "node_modules/@nestjs/bullmq": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@nestjs/bullmq/-/bullmq-10.0.1.tgz", + "integrity": "sha512-YJtfJXfnQinN7OvGx/Qd6jlQFu56zVnI1SppftSS7gkthB2CbJQAjkrfCEPDjp11wbPptBhUnatIL2N+nH/3kA==", "dependencies": { - "@nestjs/bull-shared": "^0.1.2", - "tslib": "2.4.1" + "@nestjs/bull-shared": "^10.0.1", + "tslib": "2.6.0" }, "peerDependencies": { - "@nestjs/common": "^6.10.11 || ^7.0.0 || ^8.0.0 || ^9.0.0", - "@nestjs/core": "^6.10.11 || ^7.0.0 || ^8.0.0 || ^9.0.0", - "bull": "^3.3 || ^4.0.0" + "@nestjs/common": "^8.0.0 || ^9.0.0 || ^10.0.0", + "@nestjs/core": "^8.0.0 || ^9.0.0 || ^10.0.0", + "bullmq": "^3.0.0 || ^4.0.0" } }, - "node_modules/@nestjs/bull-shared": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@nestjs/bull-shared/-/bull-shared-0.1.2.tgz", - "integrity": "sha512-q1JqieWb2YjA6OIal5XjtbF28LgJxEflwJB9x3OnE2OUgI0kWvaMlYMaW3opFmgcWPjx4o5lVhcGnwXeIhZfgg==", + "node_modules/@nestjs/bullmq/node_modules/@nestjs/bull-shared": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@nestjs/bull-shared/-/bull-shared-10.0.1.tgz", + "integrity": "sha512-8Td36l2i5x9+iQWjPB5Bd5+6u5Eangb5DclNcwrdwKqvd28xE92MSW97P4JV52C2kxrTjZwx8ck/wObAwtpQPw==", "dependencies": { - "tslib": "2.4.1" + "tslib": "2.6.0" }, "peerDependencies": { - "@nestjs/common": "^6.10.11 || ^7.0.0 || ^8.0.0 || ^9.0.0", - "@nestjs/core": "^6.10.11 || ^7.0.0 || ^8.0.0 || ^9.0.0" + "@nestjs/common": "^8.0.0 || ^9.0.0 || ^10.0.0", + "@nestjs/core": "^8.0.0 || ^9.0.0 || ^10.0.0" } }, - "node_modules/@nestjs/bull-shared/node_modules/tslib": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", - "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==" - }, - "node_modules/@nestjs/bull/node_modules/tslib": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", - "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==" - }, "node_modules/@nestjs/cli": { "version": "9.1.9", "resolved": "https://registry.npmjs.org/@nestjs/cli/-/cli-9.1.9.tgz", @@ -3919,16 +3914,6 @@ "@types/node": "*" } }, - "node_modules/@types/bull": { - "version": "3.15.9", - "resolved": "https://registry.npmjs.org/@types/bull/-/bull-3.15.9.tgz", - "integrity": "sha512-MPUcyPPQauAmynoO3ezHAmCOhbB0pWmYyijr/5ctaCqhbKWsjW0YCod38ZcLzUBprosfZ9dPqfYIcfdKjk7RNQ==", - "dev": true, - "dependencies": { - "@types/ioredis": "*", - "@types/redis": "^2.8.0" - } - }, "node_modules/@types/config": { "version": "0.0.41", "resolved": "https://registry.npmjs.org/@types/config/-/config-0.0.41.tgz", @@ -4008,16 +3993,6 @@ "@types/node": "*" } }, - "node_modules/@types/ioredis": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@types/ioredis/-/ioredis-5.0.0.tgz", - "integrity": "sha512-zJbJ3FVE17CNl5KXzdeSPtdltc4tMT3TzC6fxQS0sQngkbFZ6h+0uTafsRqu+eSLIugf6Yb0Ea0SUuRr42Nk9g==", - "deprecated": "This is a stub types definition. ioredis provides its own type definitions, so you do not need this installed.", - "dev": true, - "dependencies": { - "ioredis": "*" - } - }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", @@ -4112,15 +4087,6 @@ "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==", "dev": true }, - "node_modules/@types/redis": { - "version": "2.8.32", - "resolved": "https://registry.npmjs.org/@types/redis/-/redis-2.8.32.tgz", - "integrity": "sha512-7jkMKxcGq9p242exlbsVzuJb57KqHRhNl4dHoQu2Y5v9bCAbtIXXH0R3HleSQW4CTOqpHIYUW3t6tpUj4BVQ+w==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/semver": { "version": "7.3.13", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", @@ -5177,23 +5143,34 @@ "node": ">=4" } }, - "node_modules/bull": { - "version": "4.10.2", - "resolved": "https://registry.npmjs.org/bull/-/bull-4.10.2.tgz", - "integrity": "sha512-xa65xtWjQsLqYU/eNaXxq9VRG8xd6qNsQEjR7yjYuae05xKrzbVMVj2QgrYsTMmSs/vsqJjHqHSRRiW1+IkGXQ==", + "node_modules/bullmq": { + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/bullmq/-/bullmq-4.11.0.tgz", + "integrity": "sha512-e6/CtKHieEplmoP0NE/oty2xmuXGAoHWlpy//hYexljwM14Ff2Gqr4eLscYIdWm3W0OyxWwjjJUPXaOf5BYYvQ==", + "peer": true, "dependencies": { - "cron-parser": "^4.2.1", - "debuglog": "^1.0.0", - "get-port": "^5.1.1", - "ioredis": "^5.0.0", + "cron-parser": "^4.6.0", + "glob": "^8.0.3", + "ioredis": "^5.3.2", "lodash": "^4.17.21", - "msgpackr": "^1.5.2", - "p-timeout": "^3.2.0", - "semver": "^7.3.2", - "uuid": "^8.3.0" - }, - "engines": { - "node": ">=12" + "msgpackr": "^1.6.2", + "node-abort-controller": "^3.1.1", + "semver": "^7.5.4", + "tslib": "^2.0.0", + "uuid": "^9.0.0" + } + }, + "node_modules/bullmq/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "peer": true, + "bin": { + "uuid": "dist/bin/uuid" } }, "node_modules/call-bind": { @@ -5710,6 +5687,7 @@ "version": "4.7.1", "resolved": "https://registry.npmjs.org/cron-parser/-/cron-parser-4.7.1.tgz", "integrity": "sha512-WguFaoQ0hQ61SgsCZLHUcNbAvlK0lypKXu62ARguefYmjzaOXIVRNrAmyXzabTwUn4sQvQLkk6bjH+ipGfw8bA==", + "peer": true, "dependencies": { "luxon": "^3.2.1" }, @@ -5818,14 +5796,6 @@ } } }, - "node_modules/debuglog": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/debuglog/-/debuglog-1.0.1.tgz", - "integrity": "sha512-syBZ+rnAK3EgMsH2aYEOLUW7mZSY9Gb+0wUMCFsZvcmiz+HigA0LOcq/HoQqVuGG+EKykunc7QG2bzrponfaSw==", - "engines": { - "node": "*" - } - }, "node_modules/dedent": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", @@ -5871,6 +5841,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", + "peer": true, "engines": { "node": ">=0.10" } @@ -7079,17 +7050,6 @@ "node": ">=8.0.0" } }, - "node_modules/get-port": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/get-port/-/get-port-5.1.1.tgz", - "integrity": "sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ==", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/get-stream": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", @@ -7600,9 +7560,10 @@ } }, "node_modules/ioredis": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-5.3.0.tgz", - "integrity": "sha512-Id9jKHhsILuIZpHc61QkagfVdUj2Rag5GzG1TGEvRNeM7dtTOjICgjC+tvqYxi//PuX2wjQ+Xjva2ONBuf92Pw==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-5.3.2.tgz", + "integrity": "sha512-1DKMMzlIHM02eBBVOFQ1+AolGjs6+xEcM4PDL7NqOS6szq7H9jSaEkIUH6/a5Hl241LzW6JLSiAbNvTQjUupUA==", + "peer": true, "dependencies": { "@ioredis/commands": "^1.1.1", "cluster-key-slot": "^1.1.0", @@ -9007,7 +8968,8 @@ "node_modules/lodash.defaults": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", - "integrity": "sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==" + "integrity": "sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==", + "peer": true }, "node_modules/lodash.get": { "version": "4.4.2", @@ -9018,7 +8980,8 @@ "node_modules/lodash.isarguments": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", - "integrity": "sha512-chi4NHZlZqZD18a0imDHnZPrDeBbTtVN7GXMwuGdRH9qotxAjYs3aVLKc7zNOG9eddR5Ksd8rvFEBc9SsggPpg==" + "integrity": "sha512-chi4NHZlZqZD18a0imDHnZPrDeBbTtVN7GXMwuGdRH9qotxAjYs3aVLKc7zNOG9eddR5Ksd8rvFEBc9SsggPpg==", + "peer": true }, "node_modules/lodash.memoize": { "version": "4.1.2", @@ -9087,6 +9050,7 @@ "version": "3.2.1", "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.2.1.tgz", "integrity": "sha512-QrwPArQCNLAKGO/C+ZIilgIuDnEnKx5QYODdDtbFaxzsbZcc/a7WFq7MhsVYgRlwawLtvOUESTlfJ+hc/USqPg==", + "peer": true, "engines": { "node": ">=12" } @@ -9721,6 +9685,7 @@ "version": "1.8.3", "resolved": "https://registry.npmjs.org/msgpackr/-/msgpackr-1.8.3.tgz", "integrity": "sha512-m2JefwcKNzoHYXkH/5jzHRxAw7XLWsAdvu0FOJ+OLwwozwOV/J6UA62iLkfIMbg7G8+dIuRwgg6oz+QoQ4YkoA==", + "peer": true, "optionalDependencies": { "msgpackr-extract": "^3.0.0" } @@ -9731,6 +9696,7 @@ "integrity": "sha512-oy6KCk1+X4Bn5m6Ycq5N1EWl9npqG/cLrE8ga8NX7ZqfqYUUBS08beCQaGq80fjbKBySur0E6x//yZjzNJDt3A==", "hasInstallScript": true, "optional": true, + "peer": true, "dependencies": { "node-gyp-build-optional-packages": "5.0.7" }, @@ -9903,8 +9869,7 @@ "node_modules/node-abort-controller": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/node-abort-controller/-/node-abort-controller-3.1.1.tgz", - "integrity": "sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ==", - "dev": true + "integrity": "sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ==" }, "node_modules/node-emoji": { "version": "1.11.0", @@ -9947,6 +9912,7 @@ "resolved": "https://registry.npmjs.org/node-gyp-build-optional-packages/-/node-gyp-build-optional-packages-5.0.7.tgz", "integrity": "sha512-YlCCc6Wffkx0kHkmam79GKvDQ6x+QZkMjFGrIMxgFNILFvGSbCp2fCBC55pGTT9gVaz8Na5CLmxt/urtzRv36w==", "optional": true, + "peer": true, "bin": { "node-gyp-build-optional-packages": "bin.js", "node-gyp-build-optional-packages-optional": "optional.js", @@ -10170,14 +10136,6 @@ "node": ">=0.10.0" } }, - "node_modules/p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==", - "engines": { - "node": ">=4" - } - }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -10207,17 +10165,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/p-timeout": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz", - "integrity": "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==", - "dependencies": { - "p-finally": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", @@ -10910,6 +10857,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/redis-errors/-/redis-errors-1.2.0.tgz", "integrity": "sha512-1qny3OExCf0UvUV/5wpYKf2YwPcOqXzkwKKSmKHiE6ZMQs5heeE/c8eXK+PNllPvmjgAbfnsbpkGZWy8cBpn9w==", + "peer": true, "engines": { "node": ">=4" } @@ -10918,6 +10866,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-3.0.0.tgz", "integrity": "sha512-DJnGAeenTdpMEH6uAJRK/uiyEIH9WVsUmoLwzudwGJUwZPp80PDBWPHXSAGNPwNvIXAbe7MSUB1zQFugFml66A==", + "peer": true, "dependencies": { "redis-errors": "^1.0.0" }, @@ -11235,9 +11184,9 @@ "integrity": "sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw==" }, "node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -11507,7 +11456,8 @@ "node_modules/standard-as-callback": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/standard-as-callback/-/standard-as-callback-2.1.0.tgz", - "integrity": "sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A==" + "integrity": "sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A==", + "peer": true }, "node_modules/statuses": { "version": "2.0.1", @@ -12272,9 +12222,9 @@ } }, "node_modules/tslib": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", - "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz", + "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==" }, "node_modules/tsutils": { "version": "3.21.0", @@ -15019,7 +14969,8 @@ "@ioredis/commands": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@ioredis/commands/-/commands-1.2.0.tgz", - "integrity": "sha512-Sx1pU8EM64o2BrqNpEO1CNLtKQwyhuXuqyfH7oGKCk+1a33d2r5saW8zNwm3j6BTExtjrv2BxTgzzkMwts6vGg==" + "integrity": "sha512-Sx1pU8EM64o2BrqNpEO1CNLtKQwyhuXuqyfH7oGKCk+1a33d2r5saW8zNwm3j6BTExtjrv2BxTgzzkMwts6vGg==", + "peer": true }, "@istanbuljs/load-nyc-config": { "version": "1.1.0", @@ -15474,37 +15425,43 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-darwin-arm64/-/msgpackr-extract-darwin-arm64-3.0.0.tgz", "integrity": "sha512-5qpnNHUyyEj9H3sm/4Um/bnx1lrQGhe8iqry/1d+cQYCRd/gzYA0YLeq0ezlk4hKx4vO+dsEsNyeowqRqslwQA==", - "optional": true + "optional": true, + "peer": true }, "@msgpackr-extract/msgpackr-extract-darwin-x64": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-darwin-x64/-/msgpackr-extract-darwin-x64-3.0.0.tgz", "integrity": "sha512-ZphTFFd6SFweNAMKD+QJCrWpgkjf4qBuHltiMkKkD6FFrB3NOTRVmetAGTkJ57pa+s6J0yCH06LujWB9rZe94g==", - "optional": true + "optional": true, + "peer": true }, "@msgpackr-extract/msgpackr-extract-linux-arm": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-arm/-/msgpackr-extract-linux-arm-3.0.0.tgz", "integrity": "sha512-ztKVV1dO/sSZyGse0PBCq3Pk1PkYjsA/dsEWE7lfrGoAK3i9HpS2o7XjGQ7V4va6nX+xPPOiuYpQwa4Bi6vlww==", - "optional": true + "optional": true, + "peer": true }, "@msgpackr-extract/msgpackr-extract-linux-arm64": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-arm64/-/msgpackr-extract-linux-arm64-3.0.0.tgz", "integrity": "sha512-NEX6hdSvP4BmVyegaIbrGxvHzHvTzzsPaxXCsUt0mbLbPpEftsvNwaEVKOowXnLoeuGeD4MaqSwL3BUK2elsUA==", - "optional": true + "optional": true, + "peer": true }, "@msgpackr-extract/msgpackr-extract-linux-x64": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-x64/-/msgpackr-extract-linux-x64-3.0.0.tgz", "integrity": "sha512-9uvdAkZMOPCY7SPRxZLW8XGqBOVNVEhqlgffenN8shA1XR9FWVsSM13nr/oHtNgXg6iVyML7RwWPyqUeThlwxg==", - "optional": true + "optional": true, + "peer": true }, "@msgpackr-extract/msgpackr-extract-win32-x64": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-win32-x64/-/msgpackr-extract-win32-x64-3.0.0.tgz", "integrity": "sha512-Wg0+9615kHKlr9iLVcG5I+/CHnf6w3x5UADRv8Ad16yA0Bu5l9eVOROjV7aHPG6uC8ZPFIVVaoSjDChD+Y0pzg==", - "optional": true + "optional": true, + "peer": true }, "@nestjs/axios": { "version": "0.1.1", @@ -15514,34 +15471,22 @@ "axios": "1.2.1" } }, - "@nestjs/bull": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/@nestjs/bull/-/bull-0.6.2.tgz", - "integrity": "sha512-tx5wiIGgfYEj5RAJA1B23pn/63nsmMH0f981V1/v3NKyE07NsvOXCrwKNGQnIZZlXkXh7lgx2I80/tYwPGnVIg==", - "requires": { - "@nestjs/bull-shared": "^0.1.2", - "tslib": "2.4.1" - }, - "dependencies": { - "tslib": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", - "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==" - } - } - }, - "@nestjs/bull-shared": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@nestjs/bull-shared/-/bull-shared-0.1.2.tgz", - "integrity": "sha512-q1JqieWb2YjA6OIal5XjtbF28LgJxEflwJB9x3OnE2OUgI0kWvaMlYMaW3opFmgcWPjx4o5lVhcGnwXeIhZfgg==", + "@nestjs/bullmq": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@nestjs/bullmq/-/bullmq-10.0.1.tgz", + "integrity": "sha512-YJtfJXfnQinN7OvGx/Qd6jlQFu56zVnI1SppftSS7gkthB2CbJQAjkrfCEPDjp11wbPptBhUnatIL2N+nH/3kA==", "requires": { - "tslib": "2.4.1" + "@nestjs/bull-shared": "^10.0.1", + "tslib": "2.6.0" }, "dependencies": { - "tslib": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", - "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==" + "@nestjs/bull-shared": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@nestjs/bull-shared/-/bull-shared-10.0.1.tgz", + "integrity": "sha512-8Td36l2i5x9+iQWjPB5Bd5+6u5Eangb5DclNcwrdwKqvd28xE92MSW97P4JV52C2kxrTjZwx8ck/wObAwtpQPw==", + "requires": { + "tslib": "2.6.0" + } } } }, @@ -16055,16 +16000,6 @@ "@types/node": "*" } }, - "@types/bull": { - "version": "3.15.9", - "resolved": "https://registry.npmjs.org/@types/bull/-/bull-3.15.9.tgz", - "integrity": "sha512-MPUcyPPQauAmynoO3ezHAmCOhbB0pWmYyijr/5ctaCqhbKWsjW0YCod38ZcLzUBprosfZ9dPqfYIcfdKjk7RNQ==", - "dev": true, - "requires": { - "@types/ioredis": "*", - "@types/redis": "^2.8.0" - } - }, "@types/config": { "version": "0.0.41", "resolved": "https://registry.npmjs.org/@types/config/-/config-0.0.41.tgz", @@ -16144,15 +16079,6 @@ "@types/node": "*" } }, - "@types/ioredis": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@types/ioredis/-/ioredis-5.0.0.tgz", - "integrity": "sha512-zJbJ3FVE17CNl5KXzdeSPtdltc4tMT3TzC6fxQS0sQngkbFZ6h+0uTafsRqu+eSLIugf6Yb0Ea0SUuRr42Nk9g==", - "dev": true, - "requires": { - "ioredis": "*" - } - }, "@types/istanbul-lib-coverage": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", @@ -16247,15 +16173,6 @@ "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==", "dev": true }, - "@types/redis": { - "version": "2.8.32", - "resolved": "https://registry.npmjs.org/@types/redis/-/redis-2.8.32.tgz", - "integrity": "sha512-7jkMKxcGq9p242exlbsVzuJb57KqHRhNl4dHoQu2Y5v9bCAbtIXXH0R3HleSQW4CTOqpHIYUW3t6tpUj4BVQ+w==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, "@types/semver": { "version": "7.3.13", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", @@ -17055,20 +16972,29 @@ "resolved": "https://registry.npmjs.org/buffer-writer/-/buffer-writer-2.0.0.tgz", "integrity": "sha512-a7ZpuTZU1TRtnwyCNW3I5dc0wWNC3VR9S++Ewyk2HHZdrO3CQJqSpd+95Us590V6AL7JqUAH2IwZ/398PmNFgw==" }, - "bull": { - "version": "4.10.2", - "resolved": "https://registry.npmjs.org/bull/-/bull-4.10.2.tgz", - "integrity": "sha512-xa65xtWjQsLqYU/eNaXxq9VRG8xd6qNsQEjR7yjYuae05xKrzbVMVj2QgrYsTMmSs/vsqJjHqHSRRiW1+IkGXQ==", + "bullmq": { + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/bullmq/-/bullmq-4.11.0.tgz", + "integrity": "sha512-e6/CtKHieEplmoP0NE/oty2xmuXGAoHWlpy//hYexljwM14Ff2Gqr4eLscYIdWm3W0OyxWwjjJUPXaOf5BYYvQ==", + "peer": true, "requires": { - "cron-parser": "^4.2.1", - "debuglog": "^1.0.0", - "get-port": "^5.1.1", - "ioredis": "^5.0.0", + "cron-parser": "^4.6.0", + "glob": "^8.0.3", + "ioredis": "^5.3.2", "lodash": "^4.17.21", - "msgpackr": "^1.5.2", - "p-timeout": "^3.2.0", - "semver": "^7.3.2", - "uuid": "^8.3.0" + "msgpackr": "^1.6.2", + "node-abort-controller": "^3.1.1", + "semver": "^7.5.4", + "tslib": "^2.0.0", + "uuid": "^9.0.0" + }, + "dependencies": { + "uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "peer": true + } } }, "call-bind": { @@ -17454,6 +17380,7 @@ "version": "4.7.1", "resolved": "https://registry.npmjs.org/cron-parser/-/cron-parser-4.7.1.tgz", "integrity": "sha512-WguFaoQ0hQ61SgsCZLHUcNbAvlK0lypKXu62ARguefYmjzaOXIVRNrAmyXzabTwUn4sQvQLkk6bjH+ipGfw8bA==", + "peer": true, "requires": { "luxon": "^3.2.1" } @@ -17523,11 +17450,6 @@ "ms": "2.1.2" } }, - "debuglog": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/debuglog/-/debuglog-1.0.1.tgz", - "integrity": "sha512-syBZ+rnAK3EgMsH2aYEOLUW7mZSY9Gb+0wUMCFsZvcmiz+HigA0LOcq/HoQqVuGG+EKykunc7QG2bzrponfaSw==" - }, "dedent": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", @@ -17563,7 +17485,8 @@ "denque": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", - "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==" + "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", + "peer": true }, "depd": { "version": "2.0.0", @@ -18464,11 +18387,6 @@ "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", "dev": true }, - "get-port": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/get-port/-/get-port-5.1.1.tgz", - "integrity": "sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ==" - }, "get-stream": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", @@ -18846,9 +18764,10 @@ "dev": true }, "ioredis": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-5.3.0.tgz", - "integrity": "sha512-Id9jKHhsILuIZpHc61QkagfVdUj2Rag5GzG1TGEvRNeM7dtTOjICgjC+tvqYxi//PuX2wjQ+Xjva2ONBuf92Pw==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-5.3.2.tgz", + "integrity": "sha512-1DKMMzlIHM02eBBVOFQ1+AolGjs6+xEcM4PDL7NqOS6szq7H9jSaEkIUH6/a5Hl241LzW6JLSiAbNvTQjUupUA==", + "peer": true, "requires": { "@ioredis/commands": "^1.1.1", "cluster-key-slot": "^1.1.0", @@ -19907,7 +19826,8 @@ "lodash.defaults": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", - "integrity": "sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==" + "integrity": "sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==", + "peer": true }, "lodash.get": { "version": "4.4.2", @@ -19918,7 +19838,8 @@ "lodash.isarguments": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", - "integrity": "sha512-chi4NHZlZqZD18a0imDHnZPrDeBbTtVN7GXMwuGdRH9qotxAjYs3aVLKc7zNOG9eddR5Ksd8rvFEBc9SsggPpg==" + "integrity": "sha512-chi4NHZlZqZD18a0imDHnZPrDeBbTtVN7GXMwuGdRH9qotxAjYs3aVLKc7zNOG9eddR5Ksd8rvFEBc9SsggPpg==", + "peer": true }, "lodash.memoize": { "version": "4.1.2", @@ -19976,7 +19897,8 @@ "luxon": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.2.1.tgz", - "integrity": "sha512-QrwPArQCNLAKGO/C+ZIilgIuDnEnKx5QYODdDtbFaxzsbZcc/a7WFq7MhsVYgRlwawLtvOUESTlfJ+hc/USqPg==" + "integrity": "sha512-QrwPArQCNLAKGO/C+ZIilgIuDnEnKx5QYODdDtbFaxzsbZcc/a7WFq7MhsVYgRlwawLtvOUESTlfJ+hc/USqPg==", + "peer": true }, "macos-release": { "version": "2.5.0", @@ -20536,6 +20458,7 @@ "version": "1.8.3", "resolved": "https://registry.npmjs.org/msgpackr/-/msgpackr-1.8.3.tgz", "integrity": "sha512-m2JefwcKNzoHYXkH/5jzHRxAw7XLWsAdvu0FOJ+OLwwozwOV/J6UA62iLkfIMbg7G8+dIuRwgg6oz+QoQ4YkoA==", + "peer": true, "requires": { "msgpackr-extract": "^3.0.0" } @@ -20545,6 +20468,7 @@ "resolved": "https://registry.npmjs.org/msgpackr-extract/-/msgpackr-extract-3.0.0.tgz", "integrity": "sha512-oy6KCk1+X4Bn5m6Ycq5N1EWl9npqG/cLrE8ga8NX7ZqfqYUUBS08beCQaGq80fjbKBySur0E6x//yZjzNJDt3A==", "optional": true, + "peer": true, "requires": { "@msgpackr-extract/msgpackr-extract-darwin-arm64": "3.0.0", "@msgpackr-extract/msgpackr-extract-darwin-x64": "3.0.0", @@ -20679,8 +20603,7 @@ "node-abort-controller": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/node-abort-controller/-/node-abort-controller-3.1.1.tgz", - "integrity": "sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ==", - "dev": true + "integrity": "sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ==" }, "node-emoji": { "version": "1.11.0", @@ -20708,7 +20631,8 @@ "version": "5.0.7", "resolved": "https://registry.npmjs.org/node-gyp-build-optional-packages/-/node-gyp-build-optional-packages-5.0.7.tgz", "integrity": "sha512-YlCCc6Wffkx0kHkmam79GKvDQ6x+QZkMjFGrIMxgFNILFvGSbCp2fCBC55pGTT9gVaz8Na5CLmxt/urtzRv36w==", - "optional": true + "optional": true, + "peer": true }, "node-int64": { "version": "0.4.0", @@ -20877,11 +20801,6 @@ "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", "dev": true }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==" - }, "p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -20899,14 +20818,6 @@ "p-limit": "^3.0.2" } }, - "p-timeout": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz", - "integrity": "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==", - "requires": { - "p-finally": "^1.0.0" - } - }, "p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", @@ -21445,12 +21356,14 @@ "redis-errors": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/redis-errors/-/redis-errors-1.2.0.tgz", - "integrity": "sha512-1qny3OExCf0UvUV/5wpYKf2YwPcOqXzkwKKSmKHiE6ZMQs5heeE/c8eXK+PNllPvmjgAbfnsbpkGZWy8cBpn9w==" + "integrity": "sha512-1qny3OExCf0UvUV/5wpYKf2YwPcOqXzkwKKSmKHiE6ZMQs5heeE/c8eXK+PNllPvmjgAbfnsbpkGZWy8cBpn9w==", + "peer": true }, "redis-parser": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-3.0.0.tgz", "integrity": "sha512-DJnGAeenTdpMEH6uAJRK/uiyEIH9WVsUmoLwzudwGJUwZPp80PDBWPHXSAGNPwNvIXAbe7MSUB1zQFugFml66A==", + "peer": true, "requires": { "redis-errors": "^1.0.0" } @@ -21669,9 +21582,9 @@ "integrity": "sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw==" }, "semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "requires": { "lru-cache": "^6.0.0" }, @@ -21892,7 +21805,8 @@ "standard-as-callback": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/standard-as-callback/-/standard-as-callback-2.1.0.tgz", - "integrity": "sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A==" + "integrity": "sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A==", + "peer": true }, "statuses": { "version": "2.0.1", @@ -22450,9 +22364,9 @@ } }, "tslib": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", - "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz", + "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==" }, "tsutils": { "version": "3.21.0", diff --git a/services/package.json b/services/package.json index c186dc98db..a1f28314f2 100644 --- a/services/package.json +++ b/services/package.json @@ -40,7 +40,7 @@ "@grpc/grpc-js": "^1.8.7", "@grpc/proto-loader": "^0.7.4", "@nestjs/axios": "^0.1.1", - "@nestjs/bull": "^0.6.2", + "@nestjs/bullmq": "^10.0.1", "@nestjs/common": "^9.3.1", "@nestjs/config": "^2.3.0", "@nestjs/core": "^9.3.1", @@ -48,7 +48,6 @@ "@nestjs/platform-fastify": "^9.3.1", "@nestjs/swagger": "^6.1.4", "@nestjs/typeorm": "^9.0.1", - "bull": "^4.10.2", "class-transformer": "^0.5.1", "class-validator": "^0.14.0", "config": "^3.3.9", @@ -80,7 +79,6 @@ "@nestjs/cli": "^9.1.9", "@nestjs/schematics": "^9.0.4", "@nestjs/testing": "^9.3.1", - "@types/bull": "^3.15.9", "@types/config": "^0.0.41", "@types/express": "^4.17.16", "@types/jest": "28.1.4",