import { parentPort } from "node:worker_threads"; /** * Tell Bree the worker finished successfully so it removes the job from its * internal workers map. Without this (or process.exit), open handles can keep * the worker thread alive and block the next scheduled run ("already running"). */ export function signalBreeJobComplete(): void { if (parentPort) { parentPort.postMessage("done"); } }