fix(P0): face_cluster_done 雙路徑檢查 + run_processor 改用 async get_output_dir_for_file; 補 ingestion_complete output_dir
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user