feat: declarative pipeline config, non-blocking Scene VLM, rust_asrx

Consolidated snapshot (previously WIP in working tree).

- core/pipeline_config: new module loading config/pipeline_flows.json as the
  source of truth for stage execution mode (parallel/blocking) and dependencies
- worker/job_worker: dispatch Scene VLM to a background task when the stage is
  declared parallel, unblocking the worker poll loop; resolve processor
  dependencies from pipeline_flows.json (fallback to built-in)
- config/pipeline_flows.json: asrx depends on [cut, asr]
- scripts/fix_stuck_jobs: fix UTC timezone comparison, raise default threshold
  to 6h, skip jobs with recent processor activity
- rust_asrx: Rust speaker diarization CLI + processor wiring
- processor metadata helper; fast_face_clustering script; file_progress pipeline
  API; scan API; VAD updates
This commit is contained in:
Accusys
2026-10-15 13:01:12 +08:00
parent 667e279768
commit 882e31ab96
76 changed files with 10117 additions and 300 deletions
+20 -5
View File
@@ -705,13 +705,16 @@ impl ProcessorPool {
ProcessorType::Cut => {
let cut_path =
std::path::Path::new(&output_dir).join(format!("{}.cut.json", job.uuid));
let result = if cut_path.exists() {
let mut result: processor::CutResult = if cut_path.exists() {
let content =
std::fs::read_to_string(&cut_path).context("Failed to read cut.json")?;
serde_json::from_str(&content).context("Failed to parse cut.json")?
} else {
processor::process_cut(video_path, output_path.to_str().unwrap(), uuid).await?
};
result.add_metadata("cut", "ffmpeg_native", uuid);
let chunks_produced = result.scenes.len() as i32;
tracing::info!(
"CUT completed, storing {} scenes for {}",
@@ -751,13 +754,16 @@ impl ProcessorPool {
})
}
ProcessorType::Ocr => {
let result = processor::process_ocr(
let mut result = processor::process_ocr(
video_path,
output_path.to_str().unwrap(),
uuid,
Some(&sample_frames),
)
.await?;
result.add_metadata("ocr", "swift_ocr", uuid);
let chunks_produced = result.frames.len() as i32;
tracing::info!(
"OCR completed, storing {} frames for {}",
@@ -798,13 +804,16 @@ impl ProcessorPool {
})
}
ProcessorType::Face => {
let result = processor::process_face(
let mut result = processor::process_face(
video_path,
output_path.to_str().unwrap(),
uuid,
Some(&sample_frames),
)
.await?;
result.add_metadata("face", "swift_face", uuid);
let chunks_produced = result.frames.len() as i32;
let face_status = result.status.clone();
let total_faces = result.total_faces;
@@ -1022,8 +1031,11 @@ impl ProcessorPool {
})
}
ProcessorType::Asr => {
let result =
let mut result =
processor::process_asr(video_path, output_path.to_str().unwrap(), uuid).await?;
result.add_metadata("asr", "whisper_mlx", uuid);
let chunks_produced = result.segments.len() as i32;
let asr_status = result.status.clone();
let segment_count = result.segment_count;
@@ -1073,9 +1085,12 @@ impl ProcessorPool {
})
}
ProcessorType::Asrx => {
let result =
let mut result =
processor::process_asrx(video_path, output_path.to_str().unwrap(), uuid)
.await?;
result.add_metadata("asrx", "pyannote_diarization", uuid);
let chunks_produced = result.segments.len() as i32;
let asr_status = result.status.clone();
let segment_count = result.segment_count;