Add concurrency check for auto scan task to prevent duplicate scans

• Add pipeline status check before scan
• Add storage lock protection
• Add latest_message to status tracking
• Add helpful log message at startup
This commit is contained in:
yangdx
2025-02-28 12:22:20 +08:00
parent 04bd5413c9
commit b090a22be7
2 changed files with 20 additions and 4 deletions

View File

@@ -91,6 +91,7 @@ def initialize_share_data(workers: int = 1):
"batchs": 0, # Number of batches for processing documents
"cur_batch": 0, # Current processing batch
"request_pending": False, # Flag for pending request for processing
"latest_message": "" # Latest message from pipeline processing
})