mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-28 18:59:42 +02:00
Fix errors being swallowed
This commit is contained in:
@@ -392,11 +392,10 @@ class Pregel(
|
||||
finally:
|
||||
# cancel any pending tasks when generator is interrupted
|
||||
try:
|
||||
futures
|
||||
for task in futures:
|
||||
task.cancel()
|
||||
except NameError:
|
||||
return
|
||||
for task in futures:
|
||||
task.cancel()
|
||||
pass
|
||||
|
||||
async def _atransform(
|
||||
self,
|
||||
@@ -562,11 +561,10 @@ class Pregel(
|
||||
finally:
|
||||
# cancel any pending tasks when generator is interrupted
|
||||
try:
|
||||
futures
|
||||
for task in futures:
|
||||
task.cancel()
|
||||
except NameError:
|
||||
return
|
||||
for task in futures:
|
||||
task.cancel()
|
||||
pass
|
||||
|
||||
def invoke(
|
||||
self,
|
||||
|
||||
Reference in New Issue
Block a user