Browse Source

fix: add logging for missing edge mapping in StreamProcessor (#12008)

Signed-off-by: -LAN- <laipz8200@outlook.com>
tags/0.14.2
-LAN- 10 months ago
parent
commit
75bce2822e
No account linked to committer's email address
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      api/core/workflow/nodes/answer/base_stream_processor.py

+ 6
- 0
api/core/workflow/nodes/answer/base_stream_processor.py View File

import logging
from abc import ABC, abstractmethod from abc import ABC, abstractmethod
from collections.abc import Generator from collections.abc import Generator


from core.workflow.graph_engine.entities.event import GraphEngineEvent, NodeRunSucceededEvent from core.workflow.graph_engine.entities.event import GraphEngineEvent, NodeRunSucceededEvent
from core.workflow.graph_engine.entities.graph import Graph from core.workflow.graph_engine.entities.graph import Graph


logger = logging.getLogger(__name__)



class StreamProcessor(ABC): class StreamProcessor(ABC):
def __init__(self, graph: Graph, variable_pool: VariablePool) -> None: def __init__(self, graph: Graph, variable_pool: VariablePool) -> None:
if run_result.edge_source_handle: if run_result.edge_source_handle:
reachable_node_ids = [] reachable_node_ids = []
unreachable_first_node_ids = [] unreachable_first_node_ids = []
if finished_node_id not in self.graph.edge_mapping:
logger.warning(f"node {finished_node_id} has no edge mapping")
return
for edge in self.graph.edge_mapping[finished_node_id]: for edge in self.graph.edge_mapping[finished_node_id]:
if ( if (
edge.run_condition edge.run_condition

Loading…
Cancel
Save