mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
refactor(server): event names (#12084)
This commit is contained in:
parent
aac6a4b052
commit
0be3c4472f
16 changed files with 55 additions and 54 deletions
|
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue