From 01096021689438d486b8bfec021cad03fd632b50 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Sat, 18 May 2024 08:03:17 +0530 Subject: [PATCH] Inline --- .../machineLearning/machineLearningService.ts | 28 ++----------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/web/apps/photos/src/services/machineLearning/machineLearningService.ts b/web/apps/photos/src/services/machineLearning/machineLearningService.ts index 57b2c06a0b..73cc8e0bad 100644 --- a/web/apps/photos/src/services/machineLearning/machineLearningService.ts +++ b/web/apps/photos/src/services/machineLearning/machineLearningService.ts @@ -54,28 +54,7 @@ export async function updateMLSearchConfig(newConfig: MLSearchConfig) { return mlIDbStorage.putConfig(ML_SEARCH_CONFIG_NAME, newConfig); } -export interface MLSyncContext { - token: string; - userID: number; - - localFilesMap: Map; - outOfSyncFiles: EnteFile[]; - nSyncedFiles: number; - nSyncedFaces: number; - allSyncedFacesMap?: Map>; - - error?: Error; - - // oldMLLibraryData: MLLibraryData; - mlLibraryData: MLLibraryData; - - syncQueue: PQueue; - - getEnteWorker(id: number): Promise; - dispose(): Promise; -} - -export class LocalMLSyncContext implements MLSyncContext { +class MLSyncContext { public token: string; public userID: number; @@ -83,7 +62,6 @@ export class LocalMLSyncContext implements MLSyncContext { public outOfSyncFiles: EnteFile[]; public nSyncedFiles: number; public nSyncedFaces: number; - public allSyncedFacesMap?: Map>; public error?: Error; @@ -297,7 +275,7 @@ class MachineLearningService { // TODO-ML(MR): Keep as promise for now. this.syncContext = new Promise((resolve) => { - resolve(new LocalMLSyncContext(token, userID)); + resolve(new MLSyncContext(token, userID)); }); } else { log.info("reusing existing syncContext"); @@ -311,7 +289,7 @@ class MachineLearningService { log.info("Creating localSyncContext"); // TODO-ML(MR): this.localSyncContext = new Promise((resolve) => { - resolve(new LocalMLSyncContext(token, userID)); + resolve(new MLSyncContext(token, userID)); }); } else { log.info("reusing existing localSyncContext");