storage - move lifecycle into service

This commit is contained in:
Benjamin Pasero
2021-02-15 17:07:42 +01:00
parent 5f48de03e6
commit 5901b6a4ea
5 changed files with 52 additions and 19 deletions

View File

@@ -580,9 +580,7 @@ export class CodeApplication extends Disposable {
services.set(IExtensionUrlTrustService, new SyncDescriptor(ExtensionUrlTrustService));
// Storage
const storageMainService = new StorageMainService(this.logService, this.environmentService);
services.set(IStorageMainService, storageMainService);
this.lifecycleMainService.onWillShutdown(e => e.join(storageMainService.globalStorage.close()));
services.set(IStorageMainService, new SyncDescriptor(StorageMainService));
// Backups
const backupMainService = new BackupMainService(this.environmentService, this.configurationService, this.logService);