Inline
This commit is contained in:
parent
533c649bcb
commit
da1ae5d2a4
3 changed files with 13 additions and 13 deletions
|
@ -49,7 +49,6 @@ import {
|
|||
FaceEmbeddingService,
|
||||
MLLibraryData,
|
||||
} from "services/ml/types";
|
||||
import { logQueueStats } from "utils/machineLearning";
|
||||
import arcfaceAlignmentService from "./arcfaceAlignmentService";
|
||||
import arcfaceCropService from "./arcfaceCropService";
|
||||
import dbscanClusteringService from "./dbscanClusteringService";
|
||||
|
@ -903,3 +902,15 @@ function LocalFileMlDataToServerFileMl(
|
|||
imageDimensions.width,
|
||||
);
|
||||
}
|
||||
|
||||
export function logQueueStats(queue: PQueue, name: string) {
|
||||
queue.on("active", () =>
|
||||
log.info(
|
||||
`queuestats: ${name}: Active, Size: ${queue.size} Pending: ${queue.pending}`,
|
||||
),
|
||||
);
|
||||
queue.on("idle", () => log.info(`queuestats: ${name}: Idle`));
|
||||
queue.on("error", (error) =>
|
||||
console.error(`queuestats: ${name}: Error, `, error),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -11,9 +11,9 @@ import { JobResult } from "types/common/job";
|
|||
import { EnteFile } from "types/file";
|
||||
import { getDedicatedMLWorker } from "utils/comlink/ComlinkMLWorker";
|
||||
import { SimpleJob } from "utils/common/job";
|
||||
import { logQueueStats } from "utils/machineLearning";
|
||||
import mlIDbStorage from "utils/storage/mlIDbStorage";
|
||||
import { DedicatedMLWorker } from "worker/ml.worker";
|
||||
import { logQueueStats } from "./machineLearningService";
|
||||
|
||||
const LIVE_SYNC_IDLE_DEBOUNCE_SEC = 30;
|
||||
const LIVE_SYNC_QUEUE_TIMEOUT_SEC = 300;
|
||||
|
|
|
@ -245,14 +245,3 @@ export function areFaceIdsSame(ofFaces: Array<Face>, toFaces: Array<Face>) {
|
|||
);
|
||||
}
|
||||
|
||||
export function logQueueStats(queue: PQueue, name: string) {
|
||||
queue.on("active", () =>
|
||||
log.info(
|
||||
`queuestats: ${name}: Active, Size: ${queue.size} Pending: ${queue.pending}`,
|
||||
),
|
||||
);
|
||||
queue.on("idle", () => log.info(`queuestats: ${name}: Idle`));
|
||||
queue.on("error", (error) =>
|
||||
console.error(`queuestats: ${name}: Error, `, error),
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue