fix: replace hardcoded paths in job_worker.rs (A-4.2 P3)
Issues: 2 hardcoded output_dir paths Solution: Use config::OUTPUT_DIR Verification: cargo check --lib passes
This commit is contained in:
@@ -381,9 +381,8 @@ impl JobWorker {
|
|||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
// Get output directory from environment
|
// Get output directory from config
|
||||||
let output_dir = std::env::var("MOMENTRY_OUTPUT_DIR")
|
let output_dir = crate::core::config::OUTPUT_DIR.to_string();
|
||||||
.unwrap_or_else(|_| "/Users/accusys/momentry/output".to_string());
|
|
||||||
|
|
||||||
// Get current processor_results
|
// Get current processor_results
|
||||||
let existing_results = match self
|
let existing_results = match self
|
||||||
@@ -1925,8 +1924,7 @@ impl JobWorker {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// 2. Face Trace: face_traced.json 有 traces
|
// 2. Face Trace: face_traced.json 有 traces
|
||||||
let output_dir = std::env::var("MOMENTRY_OUTPUT_DIR")
|
let output_dir = crate::core::config::OUTPUT_DIR.to_string();
|
||||||
.unwrap_or_else(|_| "/Users/accusys/momentry/output".to_string());
|
|
||||||
let traced_path = format!("{}/{}.face_traced.json", output_dir, uuid);
|
let traced_path = format!("{}/{}.face_traced.json", output_dir, uuid);
|
||||||
|
|
||||||
let trace_status = if std::path::Path::new(&traced_path).exists() {
|
let trace_status = if std::path::Path::new(&traced_path).exists() {
|
||||||
|
|||||||
Reference in New Issue
Block a user