mirror of
				https://github.com/immich-app/immich.git
				synced 2025-10-31 10:49:11 -04:00 
			
		
		
		
	fix(cli): clean up set intervals (#2103)
This commit is contained in:
		
							parent
							
								
									da5a6d2272
								
							
						
					
					
						commit
						8563bd463c
					
				| @ -1,4 +1,4 @@ | ||||
| import { DynamicModule, Global, Module, ModuleMetadata, Provider } from '@nestjs/common'; | ||||
| import { DynamicModule, Global, Module, ModuleMetadata, OnApplicationShutdown, Provider } from '@nestjs/common'; | ||||
| import { AlbumService } from './album'; | ||||
| import { APIKeyService } from './api-key'; | ||||
| import { AssetService } from './asset'; | ||||
| @ -44,7 +44,9 @@ const providers: Provider[] = [ | ||||
| 
 | ||||
| @Global() | ||||
| @Module({}) | ||||
| export class DomainModule { | ||||
| export class DomainModule implements OnApplicationShutdown { | ||||
|   constructor(private searchService: SearchService) {} | ||||
| 
 | ||||
|   static register(options: Pick<ModuleMetadata, 'imports'>): DynamicModule { | ||||
|     return { | ||||
|       module: DomainModule, | ||||
| @ -53,4 +55,8 @@ export class DomainModule { | ||||
|       exports: [...providers], | ||||
|     }; | ||||
|   } | ||||
| 
 | ||||
|   onApplicationShutdown() { | ||||
|     this.searchService.teardown(); | ||||
|   } | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user