fix: remove lock from log transaction handling in Vertex (#5906)
This commit is contained in:
parent
248de836bb
commit
eff5eb6af2
1 changed files with 9 additions and 11 deletions
|
|
@ -15,7 +15,7 @@ from loguru import logger
|
||||||
|
|
||||||
from langflow.exceptions.component import ComponentBuildError
|
from langflow.exceptions.component import ComponentBuildError
|
||||||
from langflow.graph.schema import INPUT_COMPONENTS, OUTPUT_COMPONENTS, InterfaceComponentTypes, ResultData
|
from langflow.graph.schema import INPUT_COMPONENTS, OUTPUT_COMPONENTS, InterfaceComponentTypes, ResultData
|
||||||
from langflow.graph.utils import UnbuiltObject, UnbuiltResult
|
from langflow.graph.utils import UnbuiltObject, UnbuiltResult, log_transaction
|
||||||
from langflow.interface import initialize
|
from langflow.interface import initialize
|
||||||
from langflow.interface.listing import lazy_load_dict
|
from langflow.interface.listing import lazy_load_dict
|
||||||
from langflow.schema.artifact import ArtifactType
|
from langflow.schema.artifact import ArtifactType
|
||||||
|
|
@ -632,17 +632,15 @@ class Vertex:
|
||||||
target: Optional target vertex
|
target: Optional target vertex
|
||||||
error: Optional error information
|
error: Optional error information
|
||||||
"""
|
"""
|
||||||
# Commenting this out for now
|
if self.log_transaction_tasks:
|
||||||
# async with self._lock:
|
# Safely await and remove completed tasks
|
||||||
# if self.log_transaction_tasks:
|
task = self.log_transaction_tasks.pop()
|
||||||
# # Safely await and remove completed tasks
|
await task
|
||||||
# task = self.log_transaction_tasks.pop()
|
|
||||||
# await task
|
|
||||||
|
|
||||||
# # Create and track new task
|
# Create and track new task
|
||||||
# task = asyncio.create_task(log_transaction(flow_id, source, status, target, error))
|
task = asyncio.create_task(log_transaction(flow_id, source, status, target, error))
|
||||||
# self.log_transaction_tasks.add(task)
|
self.log_transaction_tasks.add(task)
|
||||||
# task.add_done_callback(self.log_transaction_tasks.discard)
|
task.add_done_callback(self.log_transaction_tasks.discard)
|
||||||
|
|
||||||
async def _get_result(
|
async def _get_result(
|
||||||
self,
|
self,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue