Add backend api and update doc

This commit is contained in:
Xuwznln
2025-11-26 19:03:31 +08:00
parent 2870c04086
commit 05ae4e72df
7 changed files with 1049 additions and 66 deletions

View File

@@ -791,6 +791,16 @@ class HostNode(BaseROS2DeviceNode):
del self._goals[job_id]
self.lab_logger().debug(f"[Host Node] Removed goal {job_id[:8]} from _goals")
# 存储结果供 HTTP API 查询
try:
from unilabos.app.web.controller import store_job_result
if goal_status == GoalStatus.STATUS_CANCELED:
store_job_result(job_id, status, return_info, {})
else:
store_job_result(job_id, status, return_info, result_data)
except ImportError:
pass # controller 模块可能未加载
# 发布状态到桥接器
if job_id:
for bridge in self.bridges: