refactor: config init event for first config load (#13930)

This commit is contained in:
Zack Pollard
2024-11-05 16:30:56 +00:00
committed by GitHub
parent c383e115af
commit d456d35510
18 changed files with 160 additions and 146 deletions
+2 -1
View File
@@ -38,8 +38,9 @@ const asJobItem = (dto: JobCreateDto): JobItem => {
@Injectable()
export class JobService extends BaseService {
@OnEvent({ name: 'config.init' })
@OnEvent({ name: 'config.update', server: true })
onConfigUpdate({ newConfig: config }: ArgOf<'config.update'>) {
onConfigInitOrUpdate({ newConfig: config }: ArgOf<'config.init'>) {
if (this.worker !== ImmichWorker.MICROSERVICES) {
return;
}