fix: prevent 'running' status deadlock in worker

** Problem:
- Worker set processor status to 'running' BEFORE checking capacity
- If capacity limit reached, processor was skipped but status stuck at 'running'
- Worker would skip processors with 'running' status on next poll (deadlock)

** Root Cause:
- Line 591-600: update_processor_progress(..., 'running')
- Line 1434: check capacity (TOO LATE!)
- Result: status='running' but processor never started

** Fix:
- Move capacity check BEFORE setting 'running' status
- If capacity limit reached, mark as 'skipped' immediately
- Prevents 'running' status from being set when processor won't actually run

** Impact:
- Fixes UI 'Deep Scan' deadlock issue
- Workers will no longer get stuck in infinite loop
- Processor status will accurately reflect actual state

** Files Changed:
- src/worker/job_worker.rs: Moved capacity check to line 591-592
- Removed duplicate capacity check at line 1464-1493
This commit is contained in:
Accusys
2026-09-18 03:53:39 +08:00
parent 31d1b4050f
commit 0fe09afdb6
2 changed files with 35 additions and 37 deletions
+3 -3
View File
@@ -1,9 +1,9 @@
{
"filter_config": {
"face": {
"min_capture_quality": 25,
"min_confidence": 55,
"min_size": 40
"min_capture_quality": 0.25,
"min_confidence": 0.4,
"min_size": 5
}
},
"llm_config": {