From 0c2251baf543a53316fe6d5879ab5e6f2d59ecee Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Wed, 26 Jun 2024 18:10:53 -0300 Subject: [PATCH] chore: makes sure end_all_traces run concurrently --- src/backend/base/langflow/graph/graph/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/base/langflow/graph/graph/base.py b/src/backend/base/langflow/graph/graph/base.py index 19511f271..04080df98 100644 --- a/src/backend/base/langflow/graph/graph/base.py +++ b/src/backend/base/langflow/graph/graph/base.py @@ -343,10 +343,10 @@ class Graph: except Exception as exc: logger.exception(exc) tb = traceback.format_exc() - await self.end_all_traces(error=f"{exc.__class__.__name__}: {exc}\n\n{tb}") + asyncio.create_task(self.end_all_traces(error=f"{exc.__class__.__name__}: {exc}\n\n{tb}")) raise ValueError(f"Error running graph: {exc}") from exc finally: - await self.end_all_traces() + asyncio.create_task(self.end_all_traces()) # Get the outputs vertex_outputs = [] for vertex in self.vertices: