mirror of
https://github.com/dptech-corp/Uni-Lab-OS.git
synced 2025-12-17 13:01:12 +00:00
cancel upload_registry
This commit is contained in:
@@ -356,7 +356,7 @@ def main():
|
|||||||
|
|
||||||
if BasicConfig.upload_registry:
|
if BasicConfig.upload_registry:
|
||||||
# 设备注册到服务端 - 需要 ak 和 sk
|
# 设备注册到服务端 - 需要 ak 和 sk
|
||||||
if args_dict.get("ak") and args_dict.get("sk"):
|
if BasicConfig.ak and BasicConfig.sk:
|
||||||
print_status("开始注册设备到服务端...", "info")
|
print_status("开始注册设备到服务端...", "info")
|
||||||
try:
|
try:
|
||||||
register_devices_and_resources(lab_registry)
|
register_devices_and_resources(lab_registry)
|
||||||
|
|||||||
@@ -582,6 +582,7 @@ class BaseROS2DeviceNode(Node, Generic[T]):
|
|||||||
- update: 更新现有资源
|
- update: 更新现有资源
|
||||||
- remove: 从资源树中移除资源
|
- remove: 从资源树中移除资源
|
||||||
"""
|
"""
|
||||||
|
from pylabrobot.resources.resource import Resource as ResourcePLR
|
||||||
try:
|
try:
|
||||||
data = json.loads(req.command)
|
data = json.loads(req.command)
|
||||||
results = []
|
results = []
|
||||||
@@ -672,7 +673,8 @@ class BaseROS2DeviceNode(Node, Generic[T]):
|
|||||||
if callable(func):
|
if callable(func):
|
||||||
func(found_plr_resources)
|
func(found_plr_resources)
|
||||||
for plr_resource in found_plr_resources:
|
for plr_resource in found_plr_resources:
|
||||||
plr_resource.parent.unassign_child_resource(plr_resource)
|
if plr_resource.parent is not None:
|
||||||
|
plr_resource.parent.unassign_child_resource(plr_resource)
|
||||||
self.resource_tracker.remove_resource(plr_resource)
|
self.resource_tracker.remove_resource(plr_resource)
|
||||||
self.lab_logger().info(f"移除物料 {plr_resource} 及其子节点")
|
self.lab_logger().info(f"移除物料 {plr_resource} 及其子节点")
|
||||||
for res in other_plr_resources:
|
for res in other_plr_resources:
|
||||||
|
|||||||
Reference in New Issue
Block a user