move watcher init to micro
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user