Skip to content

Commit

Permalink
start bullMQ for notification - added flow producer
Browse files Browse the repository at this point in the history
  • Loading branch information
f-w committed Nov 12, 2024
1 parent c323861 commit 971c368
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/api/notifications/notifications.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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';
Expand Down Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/api/notifications/notifications.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import { NotificationsService } from './notifications.service';
{ name: 'e' /* email */ },
{ name: 'n' /* notification */ },
),
BullModule.registerFlowProducer({}),
],
controllers: [NotificationsController],
providers: [NotificationsService],
Expand Down

0 comments on commit 971c368

Please sign in to comment.