Skip to content

Commit

Permalink
Added rabbitMQ module booting debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Maelstromeous committed Apr 28, 2023
1 parent 3e13efa commit 5e7f029
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/modules/rabbitmq/RabbitMQModule.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Module, OnApplicationBootstrap} from '@nestjs/common';
import {Logger, Module, OnApplicationBootstrap} from '@nestjs/common';
import {connect} from 'amqp-connection-manager';
import {TYPES} from '../../constants/types';
import ApiMQPublisher from './publishers/ApiMQPublisher';
Expand Down Expand Up @@ -43,17 +43,20 @@ import MetricsModule from '../metrics/MetricsModule';
],
})
export default class RabbitMQModule implements OnApplicationBootstrap {
private readonly logger = new Logger('Redis');

constructor(
private readonly apiMqPublisher: ApiMQPublisher,
private readonly apiMqDelayPublisher: ApiMQDelayPublisher,
) {
}

public async onApplicationBootstrap() {

this.logger.debug('Booting RabbitMQModule...');
await Promise.all([
this.apiMqPublisher.connect(),
this.apiMqDelayPublisher.connect(),
]);
this.logger.debug('RabbitMQModule booted!');
}
}

0 comments on commit 5e7f029

Please sign in to comment.