fix: 非阻塞回退 Workbench API 调优配置
This commit is contained in:
@@ -20,8 +20,7 @@ try {
|
||||
const nativeEnv = {
|
||||
...process.env,
|
||||
WORKBENCH_MODE: "native-test",
|
||||
WORKBENCH_NATIVE_STATE_FILE: path.join(stateDir, "state.json"),
|
||||
WORKBENCH_API_IDLE_TIMEOUT_SECONDS: "60"
|
||||
WORKBENCH_NATIVE_STATE_FILE: path.join(stateDir, "state.json")
|
||||
};
|
||||
const api = start(["bun", "cmd/hwlab-workbench-api/main.ts"], {
|
||||
...nativeEnv,
|
||||
@@ -30,6 +29,9 @@ try {
|
||||
}, "api");
|
||||
children.push(api);
|
||||
await waitFor(`${apiUrl}/health/ready`);
|
||||
if (!logs.some((item) => item.service === "api" && item.stream === "stderr" && item.line.includes('"code":"workbench_api_idle_timeout_defaulted"') && item.line.includes('"blocking":false'))) {
|
||||
throw new Error("missing non-blocking idle timeout fallback warning");
|
||||
}
|
||||
|
||||
const web = start(["bun", "run", "workbench:web:dev"], { ...process.env, WORKBENCH_WEB_PORT: String(webPort) }, "web");
|
||||
children.push(web);
|
||||
|
||||
Reference in New Issue
Block a user