simplify resource system

This commit is contained in:
Junhan Chang
2025-08-27 11:13:56 +08:00
parent 1ec642ee3a
commit 332b33c6f4
3 changed files with 407 additions and 287 deletions

View File

@@ -606,12 +606,12 @@ class ProxyWorkflowExecutor(WorkflowExecutor):
"""执行代理工作流"""
try:
# 通过协议节点调用目标设备的工作流
if self.workstation._protocol_node:
return self.workstation._protocol_node.call_device_method(
if self.workstation._workstation_node:
return self.workstation._workstation_node.call_device_method(
self.device_id, 'execute_workflow', workflow_name, parameters
)
else:
logger.error("代理模式需要protocol_node")
logger.error("代理模式需要workstation_node")
return False
except Exception as e:
@@ -621,12 +621,12 @@ class ProxyWorkflowExecutor(WorkflowExecutor):
def stop_workflow(self, emergency: bool = False) -> bool:
"""停止代理工作流"""
try:
if self.workstation._protocol_node:
return self.workstation._protocol_node.call_device_method(
if self.workstation._workstation_node:
return self.workstation._workstation_node.call_device_method(
self.device_id, 'stop_workflow', emergency
)
else:
logger.error("代理模式需要protocol_node")
logger.error("代理模式需要workstation_node")
return False
except Exception as e: