Skip to content

Commit

Permalink
Merge branch 'feat/workflow-backend' into deploy/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
takatost committed Mar 16, 2024
2 parents e1e2676 + d2d47d0 commit b44f00d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 4 additions & 1 deletion api/core/workflow/entities/workflow_entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -44,3 +44,6 @@ def __init__(self, workflow: Workflow,

self.start_at = start_at
self.variable_pool = variable_pool

self.total_tokens = 0
self.workflow_nodes_and_results = []
5 changes: 2 additions & 3 deletions api/core/workflow/workflow_engine_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ def single_step_run_workflow_node(self, workflow: Workflow,

return node_instance, node_run_result


def _workflow_run_success(self, callbacks: list[BaseWorkflowCallback] = None) -> None:
"""
Workflow run success
Expand Down Expand Up @@ -337,7 +336,8 @@ def _get_next_node(self, workflow_run_state: WorkflowRunState,

# 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:
Expand Down Expand Up @@ -464,7 +464,6 @@ def _run_workflow_node(self, workflow_run_state: WorkflowRunState,

db.session.close()


def _append_variables_recursively(self, variable_pool: VariablePool,
node_id: str,
variable_key_list: list[str],
Expand Down

0 comments on commit b44f00d

Please sign in to comment.