mirror of
https://github.com/dptech-corp/Uni-Lab-OS.git
synced 2025-12-18 13:31:20 +00:00
host node新增resource add时间统计
create_resource新增handle bump version to 0.9.2
This commit is contained in:
@@ -85,7 +85,15 @@ class Registry:
|
||||
"goal_default": yaml.safe_load(
|
||||
io.StringIO(get_yaml_from_goal_type(self.ResourceCreateFromOuterEasy.Goal))
|
||||
),
|
||||
"handles": {},
|
||||
"handles": {
|
||||
"output": [{
|
||||
"handler_key": "Labware",
|
||||
"label": "Labware",
|
||||
"data_type": "resource",
|
||||
"data_source": "handle",
|
||||
"data_key": "liquid"
|
||||
}]
|
||||
},
|
||||
},
|
||||
"test_latency": {
|
||||
"type": self.EmptyIn,
|
||||
|
||||
@@ -203,8 +203,10 @@ class HostNode(BaseROS2DeviceNode):
|
||||
try:
|
||||
for bridge in self.bridges:
|
||||
if hasattr(bridge, "resource_add"):
|
||||
self.lab_logger().info("[Host Node-Resource] Adding resources to bridge.")
|
||||
resource_start_time = time.time()
|
||||
resource_add_res = bridge.resource_add(add_schema(resource_with_parent_name))
|
||||
resource_end_time = time.time()
|
||||
self.lab_logger().info(f"[Host Node-Resource] Adding resources to bridge. {round(resource_start_time - resource_end_time, 5)} seconds")
|
||||
except Exception as ex:
|
||||
self.lab_logger().error("[Host Node-Resource] 添加物料出错!")
|
||||
self.lab_logger().error(traceback.format_exc())
|
||||
|
||||
Reference in New Issue
Block a user