yangdx commited on
Commit
84bb9ab
·
1 Parent(s): e09663e

feat(lightrag): improve job name display with file path and count

Browse files

Replace generic "indexing files" with dynamic job name showing truncated file path and total file count.

Files changed (1) hide show
  1. lightrag/lightrag.py +8 -1
lightrag/lightrag.py CHANGED
@@ -842,10 +842,17 @@ class LightRAG:
842
  logger.info("No documents to process")
843
  return
844
 
 
 
 
 
 
 
 
845
  pipeline_status.update(
846
  {
847
  "busy": True,
848
- "job_name": "indexing files",
849
  "job_start": datetime.now().isoformat(),
850
  "docs": 0,
851
  "batchs": 0,
 
842
  logger.info("No documents to process")
843
  return
844
 
845
+ # Get first document's file path and total count for job name
846
+ first_doc_id, first_doc = next(iter(to_process_docs.items()))
847
+ first_doc_path = first_doc.file_path
848
+ path_prefix = first_doc_path[:20] + ("..." if len(first_doc_path) > 20 else "")
849
+ total_files = len(to_process_docs)
850
+ job_name = f"{path_prefix}[{total_files} files]"
851
+
852
  pipeline_status.update(
853
  {
854
  "busy": True,
855
+ "job_name": job_name,
856
  "job_start": datetime.now().isoformat(),
857
  "docs": 0,
858
  "batchs": 0,