Skip to content

Commit

Permalink
added notification queue consumer
Browse files Browse the repository at this point in the history
  • Loading branch information
f-w committed Nov 16, 2024
1 parent 9dcc9d8 commit d1f550c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/observers/notification-queue-consumer.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { Processor, WorkerHost } from '@nestjs/bullmq';
import { Injectable, Logger } from '@nestjs/common';
import { Job } from 'bullmq';

@Injectable()
@Processor('n')
export class NotificationQueueConsumer extends WorkerHost {
readonly logger = new Logger(NotificationQueueConsumer.name);

constructor() {
super();
}

async process(job: Job) {
this.logger.debug(job?.id);
}
}
2 changes: 2 additions & 0 deletions src/observers/observers.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { SmsQueueConsumer } from './sms-queue-consumer';
import { SmtpService } from './smtp.service';
import { SwaggerService } from './swagger.service';
import { WebAdminConsoleService } from './web-admin-console.service';
import { NotificationQueueConsumer } from './notification-queue-consumer';

@Module({
providers: [
Expand All @@ -45,6 +46,7 @@ import { WebAdminConsoleService } from './web-admin-console.service';
MiddlewareAllService,
EmailQueueConsumer,
SmsQueueConsumer,
NotificationQueueConsumer,
],
imports: [
ConfigurationsModule,
Expand Down

0 comments on commit d1f550c

Please sign in to comment.