feat: 持久化运行记录并补充分发验证
这个提交包含在:
1 父节点
c03380168d
当前提交
aff2d5cd95
8 个文件已更改
+344
-7
没有与搜索条件相匹配的文件
+2
-2
@@ -47,13 +47,13 @@ export function startRun(flow: FlowDefinition, sender: WebContents): { runId: st
|
||||
log,
|
||||
componentOf: (node) => components.get(node.componentId)
|
||||
});
|
||||
fs.writeFileSync(path.join(root, "run.json"), JSON.stringify(result, null, 2), "utf8");
|
||||
fs.writeFileSync(path.join(root, "run.json"), JSON.stringify({ ...result, flowId: flow.id }, null, 2), "utf8");
|
||||
} catch (error) {
|
||||
const message = error instanceof Error ? error.message : String(error);
|
||||
emit({ type: "run.finished", status: "failed", durationMs: 0, error: { code: "unknown", reason: message } });
|
||||
fs.writeFileSync(
|
||||
path.join(root, "run.json"),
|
||||
JSON.stringify({ runId, status: "failed", error: message }, null, 2),
|
||||
JSON.stringify({ runId, flowId: flow.id, status: "failed", error: { reason: message }, finishedAt: new Date().toISOString(), durationMs: 0 }, null, 2),
|
||||
"utf8"
|
||||
);
|
||||
} finally {
|
||||
|
||||
在新工单中引用
屏蔽一个用户