From 646d2a13611a09e966dfd46054bb820d9ed9ddc8 Mon Sep 17 00:00:00 2001 From: Accusys Date: Tue, 17 Nov 2026 03:03:16 +0800 Subject: [PATCH] =?UTF-8?q?fix(P0):=20face=5Fcluster=5Fdone=20=E9=9B=99?= =?UTF-8?q?=E8=B7=AF=E5=BE=91=E6=AA=A2=E6=9F=A5=20+=20run=5Fprocessor=20?= =?UTF-8?q?=E6=94=B9=E7=94=A8=20async=20get=5Foutput=5Fdir=5Ffor=5Ffile;?= =?UTF-8?q?=20=E8=A3=9C=20ingestion=5Fcomplete=20output=5Fdir?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/worker/job_worker.rs | 9 +++++++-- src/worker/processor.rs | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/worker/job_worker.rs b/src/worker/job_worker.rs index ddad33e3..c9cd88d8 100644 --- a/src/worker/job_worker.rs +++ b/src/worker/job_worker.rs @@ -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 { diff --git a/src/worker/processor.rs b/src/worker/processor.rs index 6b806ed8..b2c3f3fc 100644 --- a/src/worker/processor.rs +++ b/src/worker/processor.rs @@ -684,9 +684,9 @@ impl ProcessorPool { ) -> Result { 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));