fix: 恢复 HarnessRL HWPOD 重启幂等
This commit is contained in:
@@ -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` } });
|
||||
|
||||
Reference in New Issue
Block a user