diff --git a/lightrag/api/lightrag_server.py b/lightrag/api/lightrag_server.py index 27901fb5..030a73d8 100644 --- a/lightrag/api/lightrag_server.py +++ b/lightrag/api/lightrag_server.py @@ -423,7 +423,7 @@ def create_app(args): """Get current system status""" try: pipeline_status = await get_namespace_data("pipeline_status") - + username = os.getenv("AUTH_USERNAME") password = os.getenv("AUTH_PASSWORD") if not (username and password): @@ -454,7 +454,7 @@ def create_app(args): "core_version": core_version, "api_version": __api_version__, "auth_mode": auth_mode, - "pipeline_busy": pipeline_status.get("busy", False) + "pipeline_busy": pipeline_status.get("busy", False), } except Exception as e: logger.error(f"Error getting health status: {str(e)}") diff --git a/lightrag/lightrag.py b/lightrag/lightrag.py index 718cf576..7ebcebc7 100644 --- a/lightrag/lightrag.py +++ b/lightrag/lightrag.py @@ -892,7 +892,9 @@ class LightRAG: # 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 "") + 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["job_name"] = job_name diff --git a/lightrag_webui/src/components/documents/PipelineStatusDialog.tsx b/lightrag_webui/src/components/documents/PipelineStatusDialog.tsx index cdf29ca0..43687f47 100644 --- a/lightrag_webui/src/components/documents/PipelineStatusDialog.tsx +++ b/lightrag_webui/src/components/documents/PipelineStatusDialog.tsx @@ -55,7 +55,7 @@ export default function PipelineStatusDialog({ const isAtBottom = Math.abs( (container.scrollHeight - container.scrollTop) - container.clientHeight ) < 1 - + if (isAtBottom) { setIsUserScrolled(false) } else { @@ -92,7 +92,7 @@ export default function PipelineStatusDialog({ )} > - {status?.job_name + {status?.job_name ? `${t('documentPanel.pipelineStatus.jobName')}: ${status.job_name}, ${t('documentPanel.pipelineStatus.progress')}: ${status.cur_batch}/${status.batchs}` : t('documentPanel.pipelineStatus.noActiveJob') } @@ -101,7 +101,7 @@ export default function PipelineStatusDialog({ {t('documentPanel.pipelineStatus.title')} - + {/* Position control buttons */}