From 57143fedcc2766675f1929631732517b315a262d Mon Sep 17 00:00:00 2001 From: yangdx Date: Wed, 26 Mar 2025 12:32:52 +0800 Subject: [PATCH] feat(lightrag): improve job name display with file path and count Replace generic "indexing files" with dynamic job name showing truncated file path and total file count. --- lightrag/lightrag.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lightrag/lightrag.py b/lightrag/lightrag.py index d404bffa..a2e345a5 100644 --- a/lightrag/lightrag.py +++ b/lightrag/lightrag.py @@ -842,10 +842,17 @@ class LightRAG: logger.info("No documents to process") return + # Get first document's file path and total count for job name + first_doc_id, first_doc = next(iter(to_process_docs.items())) + first_doc_path = first_doc.file_path + path_prefix = first_doc_path[:20] + ("..." if len(first_doc_path) > 20 else "") + total_files = len(to_process_docs) + job_name = f"{path_prefix}[{total_files} files]" + pipeline_status.update( { "busy": True, - "job_name": "indexing files", + "job_name": job_name, "job_start": datetime.now().isoformat(), "docs": 0, "batchs": 0,