mirror of
https://github.com/langgenius/dify.git
synced 2026-01-07 23:04:12 +00:00
fix bug
This commit is contained in:
@@ -28,7 +28,7 @@ class WorkflowRunState:
|
||||
|
||||
total_tokens: int = 0
|
||||
|
||||
workflow_nodes_and_results: list[WorkflowNodeAndResult] = []
|
||||
workflow_nodes_and_results: list[WorkflowNodeAndResult]
|
||||
|
||||
def __init__(self, workflow: Workflow,
|
||||
start_at: float,
|
||||
@@ -44,3 +44,6 @@ class WorkflowRunState:
|
||||
|
||||
self.start_at = start_at
|
||||
self.variable_pool = variable_pool
|
||||
|
||||
self.total_tokens = 0
|
||||
self.workflow_nodes_and_results = []
|
||||
|
||||
@@ -272,7 +272,6 @@ class WorkflowEngineManager:
|
||||
|
||||
return node_instance, node_run_result
|
||||
|
||||
|
||||
def _workflow_run_success(self, callbacks: list[BaseWorkflowCallback] = None) -> None:
|
||||
"""
|
||||
Workflow run success
|
||||
@@ -337,7 +336,8 @@ class WorkflowEngineManager:
|
||||
|
||||
# fetch target node id from outgoing edges
|
||||
outgoing_edge = None
|
||||
source_handle = predecessor_node.node_run_result.edge_source_handle
|
||||
source_handle = predecessor_node.node_run_result.edge_source_handle \
|
||||
if predecessor_node.node_run_result else None
|
||||
if source_handle:
|
||||
for edge in outgoing_edges:
|
||||
if edge.get('source_handle') and edge.get('source_handle') == source_handle:
|
||||
@@ -464,7 +464,6 @@ class WorkflowEngineManager:
|
||||
|
||||
db.session.close()
|
||||
|
||||
|
||||
def _append_variables_recursively(self, variable_pool: VariablePool,
|
||||
node_id: str,
|
||||
variable_key_list: list[str],
|
||||
|
||||
Reference in New Issue
Block a user