mirror of
https://github.com/HKUDS/LightRAG.git
synced 2025-12-03 10:26:31 +00:00
fix: check and process queued docs even when upload directory is empty
This commit is contained in:
parent
65a4437f78
commit
772f981e7e
@ -1052,12 +1052,14 @@ async def run_scanning_process(
|
||||
total_files = len(new_files)
|
||||
logger.info(f"Found {total_files} files to index.")
|
||||
|
||||
if not new_files:
|
||||
return
|
||||
|
||||
# Process all files at once with track_id
|
||||
await pipeline_index_files(rag, new_files, track_id)
|
||||
logger.info(f"Scanning process completed: {total_files} files Processed.")
|
||||
if new_files:
|
||||
# Process all files at once with track_id
|
||||
await pipeline_index_files(rag, new_files, track_id)
|
||||
logger.info(f"Scanning process completed: {total_files} files Processed.")
|
||||
else:
|
||||
# No new files to index, check if there are any documents in the queue
|
||||
logger.info("No upload file found, check if there are any documents in the queue...")
|
||||
await rag.apipeline_process_enqueue_documents()
|
||||
|
||||
except Exception as e:
|
||||
logger.error(f"Error during scanning process: {str(e)}")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user