Workaround

This commit is contained in:
Manav Rathi
2024-07-30 14:45:34 +05:30
parent d92a31d8d8
commit 3d83786f6c

View File

@@ -1,6 +1,24 @@
import log from "../log";
/**
* [Note: Using Electron APIs in UtilityProcess]
*
* Only a small subset of the Electron APIs are available to a UtilityProcess.
* As of writing (Jul 2024, Electron 30), only the following are available:
* - net
* - systemPreferences
*
* In particular, `app` is not available.
*
* We structure our code so that it doesn't need anything apart from `net`.
*/
// import log from "../log";
import { ensure, wait } from "../utils/common";
const log = {
info: (...ms: unknown[]) => console.log(...ms),
debug: (fn: () => unknown) => console.log(fn()),
};
log.debug(() => "Started ML worker process");
process.parentPort.once("message", (e) => {