diff --git a/src/api/notifications/notifications.controller.ts b/src/api/notifications/notifications.controller.ts index 99816418f..4e35cf988 100644 --- a/src/api/notifications/notifications.controller.ts +++ b/src/api/notifications/notifications.controller.ts @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +import { getFlowProducerToken } from '@nestjs/bullmq'; import { Body, Controller, @@ -42,6 +43,7 @@ import { } from '@nestjs/swagger'; import { queue } from 'async'; import axios from 'axios'; +import { FlowProducer } from 'bullmq'; import { Request } from 'express'; import jmespath from 'jmespath'; import { pullAll } from 'lodash'; @@ -88,6 +90,7 @@ export class NotificationsController extends BaseController { readonly configurationsService: ConfigurationsService, private readonly bouncesService: BouncesService, @Inject(REQUEST) private readonly req: Request & { user: UserProfile }, + @Inject(getFlowProducerToken()) private readonly flowProducer: FlowProducer, ) { super(appConfigService, configurationsService); const ft = this.appConfig.notification?.broadcastCustomFilterFunctions; diff --git a/src/api/notifications/notifications.module.ts b/src/api/notifications/notifications.module.ts index 44c836f0c..440c96d3c 100644 --- a/src/api/notifications/notifications.module.ts +++ b/src/api/notifications/notifications.module.ts @@ -38,6 +38,7 @@ import { NotificationsService } from './notifications.service'; { name: 'e' /* email */ }, { name: 'n' /* notification */ }, ), + BullModule.registerFlowProducer({}), ], controllers: [NotificationsController], providers: [NotificationsService],