mirror of
https://github.com/immich-app/immich.git
synced 2025-03-11 02:23:09 -05:00
move watcher init to micro
This commit is contained in:
parent
f1331905f0
commit
1073dc35b1
3 changed files with 3 additions and 7 deletions
|
@ -45,7 +45,6 @@ export class AppService {
|
|||
private authService: AuthService,
|
||||
private configService: SystemConfigService,
|
||||
private jobService: JobService,
|
||||
private libraryService: LibraryService,
|
||||
private serverService: ServerInfoService,
|
||||
private sharedLinkService: SharedLinkService,
|
||||
private storageService: StorageService,
|
||||
|
@ -66,15 +65,10 @@ export class AppService {
|
|||
await this.databaseService.init();
|
||||
await this.configService.init();
|
||||
this.storageService.init();
|
||||
await this.libraryService.init();
|
||||
await this.serverService.init();
|
||||
this.logger.log(`Feature Flags: ${JSON.stringify(await this.serverService.getFeatures(), null, 2)}`);
|
||||
}
|
||||
|
||||
async teardown() {
|
||||
await this.libraryService.unwatchAll();
|
||||
}
|
||||
|
||||
ssr(excludePaths: string[]) {
|
||||
let index = '';
|
||||
try {
|
||||
|
|
|
@ -40,6 +40,7 @@ export class AppService {
|
|||
async init() {
|
||||
await this.databaseService.init();
|
||||
await this.configService.init();
|
||||
await this.libraryService.init();
|
||||
await this.jobService.init({
|
||||
[JobName.ASSET_DELETION]: (data) => this.assetService.handleAssetDeletion(data),
|
||||
[JobName.ASSET_DELETION_CHECK]: () => this.assetService.handleAssetDeletionCheck(),
|
||||
|
@ -86,6 +87,8 @@ export class AppService {
|
|||
}
|
||||
|
||||
async teardown() {
|
||||
await this.libraryService.unwatchAll();
|
||||
|
||||
await this.metadataService.teardown();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -131,7 +131,6 @@ export const testApp = {
|
|||
teardown: async () => {
|
||||
if (app) {
|
||||
await app.get(MicroAppService).teardown();
|
||||
await app.get(AppService).teardown();
|
||||
await app.close();
|
||||
}
|
||||
await db.disconnect();
|
||||
|
|
Loading…
Add table
Reference in a new issue