From 1f8ebc0bcacaee008c079ca97ea6d29e85976886 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Thu, 11 Apr 2024 12:22:09 +0530 Subject: [PATCH] Inline --- .../photos/src/services/machineLearning/mlSyncJob.ts | 9 --------- .../src/services/machineLearning/mlWorkManager.ts | 10 +++++++++- 2 files changed, 9 insertions(+), 10 deletions(-) delete mode 100644 web/apps/photos/src/services/machineLearning/mlSyncJob.ts diff --git a/web/apps/photos/src/services/machineLearning/mlSyncJob.ts b/web/apps/photos/src/services/machineLearning/mlSyncJob.ts deleted file mode 100644 index d041b976fb..0000000000 --- a/web/apps/photos/src/services/machineLearning/mlSyncJob.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { JobResult } from "types/common/job"; -import { MLSyncResult } from "types/machineLearning"; -import { SimpleJob } from "utils/common/job"; - -export interface MLSyncJobResult extends JobResult { - mlSyncResult: MLSyncResult; -} - -export class MLSyncJob extends SimpleJob {} diff --git a/web/apps/photos/src/services/machineLearning/mlWorkManager.ts b/web/apps/photos/src/services/machineLearning/mlWorkManager.ts index 37b7c7d13b..d62d6f829e 100644 --- a/web/apps/photos/src/services/machineLearning/mlWorkManager.ts +++ b/web/apps/photos/src/services/machineLearning/mlWorkManager.ts @@ -5,18 +5,26 @@ import { getToken, getUserID } from "@ente/shared/storage/localStorage/helpers"; import { FILE_TYPE } from "constants/file"; import debounce from "debounce"; import PQueue from "p-queue"; +import { JobResult } from "types/common/job"; import { EnteFile } from "types/file"; +import { MLSyncResult } from "types/machineLearning"; import { getDedicatedMLWorker } from "utils/comlink/ComlinkMLWorker"; +import { SimpleJob } from "utils/common/job"; import { logQueueStats } from "utils/machineLearning"; import { getMLSyncJobConfig } from "utils/machineLearning/config"; import mlIDbStorage from "utils/storage/mlIDbStorage"; import { DedicatedMLWorker } from "worker/ml.worker"; -import { MLSyncJob, MLSyncJobResult } from "./mlSyncJob"; const LIVE_SYNC_IDLE_DEBOUNCE_SEC = 30; const LIVE_SYNC_QUEUE_TIMEOUT_SEC = 300; const LOCAL_FILES_UPDATED_DEBOUNCE_SEC = 30; +export interface MLSyncJobResult extends JobResult { + mlSyncResult: MLSyncResult; +} + +export class MLSyncJob extends SimpleJob {} + class MLWorkManager { private mlSyncJob: MLSyncJob; private syncJobWorker: ComlinkWorker;