docs: TKG & Worker fix progress

TKG Builder fix:
- ✅ Migrated to Qdrant V4.0 architecture
- ✅ Replaced face_detections table with Qdrant _faces
- ✅ Tested successfully (7 nodes, 6 edges)

Worker execution logic:
- ⏸️ Still analyzing
- ❌ Worker detects job but doesn't execute processors
- Need to find and fix execution logic in job_worker.rs

Next steps:
- Analyze Worker poll_and_process function
- Add or fix processor execution logic
This commit is contained in:
Accusys
2026-09-27 11:00:19 +08:00
parent 82c400ed6c
commit 23d5a49c41
@@ -0,0 +1,113 @@
---
title: TKG & Worker Fix Progress
version: 1.0
date: 2026-09-27
author: OpenCode
status: partial
---
## 修復進度
### ✅ TKG Builder 修復完成
**問題**: TKG Builder 使用已廢棄的 `face_detections` 表
**解決**: 遷移到 Qdrant V4.0 架構
**修改內容**:
1. 添加 qdrant_faces 模塊導入
2. 替換所有 SQL 查詢為 Qdrant API 調用
3. 修改 5 個函數使用 Qdrant 數據:
- build_face_track_nodes
- build_co_occurrence_edges
- build_speaker_face_edges
- build_face_face_edges
- build_face_body_edges
4. 修復默認配置(schema 和 output_dir)
**測試結果**:
- ✅ 成功創建 7 個 face_track 節點
- ✅ 成功創建 6 個 face-face 共現邊
- ✅ TKG Builder 現在可以正常工作
**提交**: `82c400e` - fix: migrate TKG Builder to V4.0 architecture (Qdrant)
---
### ⏸️ Worker 執行邏輯修復待處理
**問題**: Worker 檢測到 monitor_job 但不執行處理器
**現象**:
```
[INFO] Processing job: b496a68800f90770aa7246c877f38985 (958)
[INFO] Processors specified: ["ASR", "FACE", "OCR", ...]
[INFO] check_and_complete_job: missing processor results: [...]
```
**循環重複但不執行**
**分析**:
可能原因:
1. Worker 只有檢查邏輯,缺少執行邏輯
2. 執行邏輯被條件跳過
3. 執行邏輯有 bug
**需要檢查**:
- `src/worker/job_worker.rs` 中的 `poll_and_process` 函數
- 處理器執行函數
- 條件判斷邏輯
**修復方向**:
1. 找到處理器執行函數
2. 添加執行邏輯(如果缺失)
3. 修復執行條件(如果有問題)
---
## 文件變更
| 文件 | 變更 | 狀態 |
|------|------|------|
| `scripts/tkg_builder.py` | 遷移到 Qdrant | ✅ 完成 |
| `src/worker/job_worker.rs` | 待分析 | ⏸️ 待處理 |
---
## 測試統計
### TKG Builder
**之前**: ❌ 失敗(face_detections 表不存在)
**現在**: ✅ 成功(7 nodes, 6 edges)
### Worker
**狀態**: ❌ 仍不執行處理器
**下一步**: 分析 Worker 代碼
---
## 下一步
1. **分析 Worker 代碼**
- 查看 poll_and_process 函數
- 找到處理器執行邏輯
- 識別為何不執行
2. **修復 Worker**
- 添加執行邏輯(如果缺失)
- 或修復執行條件
3. **完整測試**
- 測試 TKG Builder(已完成)
- 測試 Worker(待處理)
- 測試完整 Pipeline
---
## 相關文件
- `/Users/accusys/momentry_core/scripts/tkg_builder.py`
- `/Users/accusys/momentry_core/src/worker/job_worker.rs`
- `/Users/accusys/momentry_core/docs_v1.0/M4_workspace/2026-09-27_processor_complete_test_report.md`