mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-28 04:25:08 +02:00
Avoid closing drain before seeing first message in either topic
This commit is contained in:
@@ -32,7 +32,9 @@ async def drain_topics_async(
|
||||
def done() -> bool:
|
||||
return (
|
||||
len(orch_msgs) > 0
|
||||
and any(orch_msgs)
|
||||
and len(exec_msgs) > 0
|
||||
and any(exec_msgs)
|
||||
and not orch_msgs[-1]
|
||||
and not exec_msgs[-1]
|
||||
)
|
||||
@@ -97,7 +99,9 @@ def drain_topics(
|
||||
def done() -> bool:
|
||||
return (
|
||||
len(orch_msgs) > 0
|
||||
and any(orch_msgs)
|
||||
and len(exec_msgs) > 0
|
||||
and any(exec_msgs)
|
||||
and not orch_msgs[-1]
|
||||
and not exec_msgs[-1]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user