fix: 恢复 HarnessRL HWPOD 重启幂等

This commit is contained in:
root
2026-07-17 04:48:32 +02:00
parent 84dc6618e6
commit 9715992cd4
11 changed files with 315 additions and 30 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ export async function handleHwpodNodeOpsHttp(request, response, options) {
if (request.method === "GET") {
const planId = new URL(request.url, "http://hwlab.local").searchParams.get("planId")?.trim() ?? "";
if (planId) {
const operation = options.hwpodNodeWsRegistry.lookup(planId);
const operation = await options.hwpodNodeWsRegistry.lookup(planId);
sendJson(response, operation ? 200 : 404, operation
? { ok: true, status: operation.result ? "completed" : "running", contractVersion: HWPOD_NODE_OPS_CONTRACT_VERSION, ...operation }
: { ok: false, status: "not-found", contractVersion: HWPOD_NODE_OPS_CONTRACT_VERSION, planId, error: { code: "hwpod_operation_not_found", message: `hwpod operation ${planId} was not found` } });