mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-25 20:05:46 -06:00
f19f62cb77
* perf(node-host): prewarm worker bundles * test(gateway): gate worker finalization responsiveness * fix(node-host): negotiate bundle prewarming * fix(protocol): refresh worker prewarm models * fix(node-host): preserve prewarm upgrade compatibility
21 lines
727 B
TypeScript
21 lines
727 B
TypeScript
import { flushCompileCache } from "node:module";
|
|
import "./worker-deploy-runtime.js";
|
|
import workerDeployBrowserRuntime from "./worker-deploy-browser-runtime.js";
|
|
import { runWorkerProcess } from "./worker-process.js";
|
|
|
|
const args = process.argv.slice(2);
|
|
const internalWorkerIpc = args[0] === "--internal-worker-ipc";
|
|
const internalWorkerPrewarm = args[0] === "--internal-worker-prewarm";
|
|
if (args.length > 1 || (args.length === 1 && !internalWorkerIpc && !internalWorkerPrewarm)) {
|
|
throw new Error("worker deploy entry received unsupported arguments");
|
|
}
|
|
|
|
if (internalWorkerPrewarm) {
|
|
flushCompileCache();
|
|
} else {
|
|
await runWorkerProcess({
|
|
internalWorkerIpc,
|
|
browserRuntime: workerDeployBrowserRuntime,
|
|
});
|
|
}
|