refactor(server): event names (#12084)

This commit is contained in:
Jason Rasmussen 2024-08-27 18:06:50 -04:00 committed by GitHub
parent aac6a4b052
commit 0be3c4472f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 55 additions and 54 deletions

View file

@ -62,7 +62,7 @@ export class ApiModule implements OnModuleInit, OnModuleDestroy {
async onModuleInit() {
const items = setupEventHandlers(this.moduleRef);
await this.eventRepository.emit('onBootstrap', 'api');
await this.eventRepository.emit('app.bootstrap', 'api');
this.logger.setContext('EventLoader');
const eventMap = _.groupBy(items, 'event');
@ -74,7 +74,7 @@ export class ApiModule implements OnModuleInit, OnModuleDestroy {
}
async onModuleDestroy() {
await this.eventRepository.emit('onShutdown');
await this.eventRepository.emit('app.shutdown');
}
}
@ -90,11 +90,11 @@ export class MicroservicesModule implements OnModuleInit, OnModuleDestroy {
async onModuleInit() {
setupEventHandlers(this.moduleRef);
await this.eventRepository.emit('onBootstrap', 'microservices');
await this.eventRepository.emit('app.bootstrap', 'microservices');
}
async onModuleDestroy() {
await this.eventRepository.emit('onShutdown');
await this.eventRepository.emit('app.shutdown');
}
}