Fix linting
This commit is contained in:
@@ -503,6 +503,7 @@ async def merge_nodes_and_edges(
|
||||
"""
|
||||
# Get lock manager from shared storage
|
||||
from .kg.shared_storage import get_graph_db_lock
|
||||
|
||||
graph_db_lock = get_graph_db_lock(enable_logging=False)
|
||||
|
||||
# Collect all nodes and edges from all chunks
|
||||
@@ -527,7 +528,9 @@ async def merge_nodes_and_edges(
|
||||
# Use graph database lock to ensure atomic merges and updates
|
||||
async with graph_db_lock:
|
||||
async with pipeline_status_lock:
|
||||
log_message = f"Merging nodes/edges {current_file_number}/{total_files}: {file_path}"
|
||||
log_message = (
|
||||
f"Merging nodes/edges {current_file_number}/{total_files}: {file_path}"
|
||||
)
|
||||
logger.info(log_message)
|
||||
pipeline_status["latest_message"] = log_message
|
||||
pipeline_status["history_messages"].append(log_message)
|
||||
@@ -585,9 +588,7 @@ async def merge_nodes_and_edges(
|
||||
}
|
||||
await entity_vdb.upsert(data_for_vdb)
|
||||
|
||||
log_message = (
|
||||
f"Updating {total_relations_count} relations {current_file_number}/{total_files}: {file_path}"
|
||||
)
|
||||
log_message = f"Updating {total_relations_count} relations {current_file_number}/{total_files}: {file_path}"
|
||||
logger.info(log_message)
|
||||
if pipeline_status is not None:
|
||||
async with pipeline_status_lock:
|
||||
|
Reference in New Issue
Block a user