Merge branch 'flow2.0-operators' into chore/update-api

This commit is contained in:
谨欣 2024-08-30 16:46:50 +08:00
commit 3e0a243abc
2 changed files with 9 additions and 1 deletions

View File

@ -609,6 +609,11 @@ class FlowFactory:
key_to_resource_nodes[key] = node
key_to_resource[key] = node.data
if not key_to_operator_nodes and not key_to_resource_nodes:
raise FlowMetadataException(
"No operator or resource nodes found in the flow."
)
for edge_index, edge in enumerate(flow_data.edges):
source_key = edge.source
target_key = edge.target

View File

@ -158,7 +158,10 @@ async def update(
ServerResponse: The response
"""
try:
return Result.succ(service.update_flow(request))
res = await blocking_func_to_async(
global_system_app, service.update_flow, request
)
return Result.succ(res)
except Exception as e:
return Result.failed(msg=str(e))