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
+4 -3
View File
@@ -66,7 +66,7 @@ export class LibraryService {
this.configCore = SystemConfigCore.create(systemMetadataRepository, this.logger);
}
@OnEmit({ event: 'onBootstrap' })
@OnEmit({ event: 'app.bootstrap' })
async onBootstrap() {
const config = await this.configCore.getConfig({ withCache: false });
@@ -104,7 +104,8 @@ export class LibraryService {
});
}
onConfigValidate({ newConfig }: ArgOf<'onConfigValidate'>) {
@OnEmit({ event: 'config.validate' })
onConfigValidate({ newConfig }: ArgOf<'config.validate'>) {
const { scan } = newConfig.library;
if (!validateCronExpression(scan.cronExpression)) {
throw new Error(`Invalid cron expression ${scan.cronExpression}`);
@@ -189,7 +190,7 @@ export class LibraryService {
}
}
@OnEmit({ event: 'onShutdown' })
@OnEmit({ event: 'app.shutdown' })
async onShutdown() {
await this.unwatchAll();
}