fix: use positional args for swift face/pose config-driven execution

The swift_face/swift_pose CLIs take positional <input> <output> paths,
but processor_tools_v3.json passed an unsupported --output flag, so the
config-driven path always failed (exit 64, 'Unknown option --output')
and fell back to hard-coded logic for every face/pose run.

- config/processor_tools_v3.json: drop --output, use positional args
- face.rs/pose.rs: expand {video_path}/{output_path}/{file_uuid}
  placeholders in config args before executing

Verified: positional args exit 0 and produce face.json; old args exit 64.
This commit is contained in:
Accusys
2026-10-02 14:25:44 +08:00
parent 9e1fa0a3ff
commit 8c6a2de820
3 changed files with 16 additions and 4 deletions
-2
View File
@@ -31,7 +31,6 @@
"executable": "scripts/swift_processors/.build/release/swift_pose",
"args": [
"{video_path}",
"--output",
"{output_path}",
"--uuid",
"{file_uuid}"
@@ -103,7 +102,6 @@
"executable": "scripts/swift_processors/.build/release/swift_face",
"args": [
"{video_path}",
"--output",
"{output_path}",
"--uuid",
"{file_uuid}"
+8 -1
View File
@@ -345,7 +345,14 @@ async fn run_face_with_config(
let args = if !tool.args.is_empty() {
tracing::info!("[FACE] Using args from config: {:?}", tool.args);
tool.args.clone()
tool.args
.iter()
.map(|a| {
a.replace("{video_path}", video_path)
.replace("{output_path}", output_path)
.replace("{file_uuid}", uuid.unwrap_or(""))
})
.collect()
} else {
let mut args = vec![video_path.to_string(), output_path.to_string()];
if let Some(u) = uuid {
+8 -1
View File
@@ -526,7 +526,14 @@ async fn run_pose_with_config(
let args = if !tool.args.is_empty() {
tracing::info!("[POSE] Using args from config: {:?}", tool.args);
tool.args.clone()
tool.args
.iter()
.map(|a| {
a.replace("{video_path}", video_path)
.replace("{output_path}", output_path)
.replace("{file_uuid}", uuid.unwrap_or(""))
})
.collect()
} else {
let mut args = vec![video_path.to_string(), output_path.to_string()];
if let Some(u) = uuid {