fix(P0): face_cluster_done 雙路徑檢查 + run_processor 改用 async get_output_dir_for_file; 補 ingestion_complete output_dir
Core Test / lint-and-test (push) Has been cancelled
Cross-Project Integration / integration (push) Has been cancelled

This commit is contained in:
Accusys
2026-11-17 03:03:16 +08:00
parent d01e456ae5
commit 646d2a1361
2 changed files with 9 additions and 4 deletions
+7 -2
View File
@@ -2896,8 +2896,13 @@ async fn process_job(&self, job: crate::core::db::MonitorJob) -> Result<()> {
}
true
} else {
let cluster_path = format!("{}/{}.face_cluster.json", output_dir, uuid);
let file_exists = std::path::Path::new(&cluster_path).exists();
// Check BOTH per-library and global output dirs
// (rust_face_cluster writes to global OUTPUT_DIR via sync stub)
let cluster_path_lib = format!("{}/{}.face_cluster.json", output_dir, uuid);
let cluster_path_global = format!("{}/{}.face_cluster.json",
crate::core::config::OUTPUT_DIR.as_str().trim_end_matches('/'), uuid);
let file_exists = std::path::Path::new(&cluster_path_lib).exists()
|| std::path::Path::new(&cluster_path_global).exists();
if file_exists {
true
} else {
+2 -2
View File
@@ -684,9 +684,9 @@ impl ProcessorPool {
) -> Result<ProcessorOutput> {
let video_path = job.video_path.as_ref().context("No video path in job")?;
// Determine per-library output directory
// Determine per-library output directory (async, correct path resolution)
let output_dir = PathBuf::from(
crate::core::config::get_output_dir_for_file_sync(&job.uuid, db.pool())
crate::core::config::get_output_dir_for_file(&job.uuid, db.pool()).await
);
let suffix = format!("{}.{}", job.uuid, processor_type.as_str());
let output_path = output_dir.join(format!("{}.json", suffix));