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.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.listing import lazy_load_dict
|
||||
from langflow.schema.artifact import ArtifactType
|
||||
|
|
@ -632,17 +632,15 @@ class Vertex:
|
|||
target: Optional target vertex
|
||||
error: Optional error information
|
||||
"""
|
||||
# Commenting this out for now
|
||||
# async with self._lock:
|
||||
# if self.log_transaction_tasks:
|
||||
# # Safely await and remove completed tasks
|
||||
# task = self.log_transaction_tasks.pop()
|
||||
# await task
|
||||
if self.log_transaction_tasks:
|
||||
# Safely await and remove completed tasks
|
||||
task = self.log_transaction_tasks.pop()
|
||||
await task
|
||||
|
||||
# # Create and track new task
|
||||
# task = asyncio.create_task(log_transaction(flow_id, source, status, target, error))
|
||||
# self.log_transaction_tasks.add(task)
|
||||
# task.add_done_callback(self.log_transaction_tasks.discard)
|
||||
# Create and track new task
|
||||
task = asyncio.create_task(log_transaction(flow_id, source, status, target, error))
|
||||
self.log_transaction_tasks.add(task)
|
||||
task.add_done_callback(self.log_transaction_tasks.discard)
|
||||
|
||||
async def _get_result(
|
||||
self,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue