1
0
mirror of https://github.com/immich-app/immich.git synced 2025-07-08 06:23:00 +02:00

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
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');
}
}