From f8dfb8385548522ab3724595d72396957b6e516d Mon Sep 17 00:00:00 2001 From: Shailesh Pandit Date: Mon, 31 Jan 2022 14:16:38 +0530 Subject: [PATCH] Add more logging around Ml DB --- src/utils/storage/mlIDbStorage.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/utils/storage/mlIDbStorage.ts b/src/utils/storage/mlIDbStorage.ts index 214158b15..35c27553b 100644 --- a/src/utils/storage/mlIDbStorage.ts +++ b/src/utils/storage/mlIDbStorage.ts @@ -115,6 +115,9 @@ class MLIDbStorage { .objectStore('configs') .add(DEFAULT_ML_SEARCH_CONFIG, ML_SEARCH_CONFIG_NAME); } + console.log( + `Ml DB upgraded to version: ${newVersion} from version: ${oldVersion}` + ); }, }); } @@ -122,6 +125,7 @@ class MLIDbStorage { public get db(): Promise> { if (!this._db) { this._db = this.openDB(); + console.log('Opening Ml DB'); } return this._db; @@ -131,6 +135,7 @@ class MLIDbStorage { const db = await this.db; db.close(); await deleteDB(MLDATA_DB_NAME); + console.log('Cleared Ml DB'); this._db = undefined; await this.db; }