Debounce never calls the underyling if it keeps getting called within wait

This commit is contained in:
Manav Rathi
2024-07-11 20:07:31 +05:30
parent 4773c7c262
commit 349a5021a5

View File

@@ -10,7 +10,6 @@ import { ensureElectron } from "@/next/electron";
import log from "@/next/log";
import { ComlinkWorker } from "@/next/worker/comlink-worker";
import { proxy } from "comlink";
import pDebounce from "p-debounce";
import { getRemoteFlag, updateRemoteFlag } from "../remote-store";
import type { UploadItem } from "../upload/types";
import { regenerateFaceCrops } from "./crop";
@@ -411,7 +410,7 @@ const setInterimScheduledStatus = () => {
setMLStatusSnapshot({ phase: "scheduled", nSyncedFiles, nTotalFiles });
};
const workerDidProcessFile = () => void pDebounce(triggerStatusUpdate, 2000)();
const workerDidProcessFile = triggerStatusUpdate;
/**
* Return the IDs of all the faces in the given {@link enteFile} that are not