refactor(server): app module (#13193)

This commit is contained in:
Jason Rasmussen
2024-10-04 16:57:34 -04:00
committed by GitHub
parent 7ee0221c8e
commit 5d0a4bb1a5
18 changed files with 126 additions and 134 deletions

View File

@@ -1,6 +1,7 @@
import { Injectable } from '@nestjs/common';
import { SystemConfig } from 'src/config';
import { OnEvent } from 'src/decorators';
import { ImmichWorker } from 'src/enum';
import { WithoutProperty } from 'src/interfaces/asset.interface';
import { DatabaseLock } from 'src/interfaces/database.interface';
import { ArgOf } from 'src/interfaces/event.interface';
@@ -21,7 +22,7 @@ import { usePagination } from 'src/utils/pagination';
export class SmartInfoService extends BaseService {
@OnEvent({ name: 'app.bootstrap' })
async onBootstrap(app: ArgOf<'app.bootstrap'>) {
if (app !== 'microservices') {
if (app !== ImmichWorker.MICROSERVICES) {
return;
}