feat: dynamic processor list from pipeline_flows.json
- Changed pipeline_flows.json: scene → scene_vlm - Added get_enabled_processors() method to PipelineFlows - Updated create_monitor_job to use dynamic processors - Updated process_register_command to use dynamic processors - Removed hardcoded processor arrays - Added tests for get_enabled_processors()
This commit is contained in:
@@ -714,7 +714,8 @@ impl JobWorker {
|
||||
"[COMMAND_QUEUE] Auto-pipeline job {} created for {}",
|
||||
job.id, file_uuid
|
||||
);
|
||||
let all_procs: Vec<&str> = vec!["cut", "asr", "asrx", "ocr", "face"];
|
||||
let cfg = crate::core::pipeline_config::get();
|
||||
let all_procs: Vec<String> = cfg.get_enabled_processors("register");
|
||||
let total: i64 = sqlx::query_scalar(&format!(
|
||||
"SELECT COALESCE(total_frames, 0) FROM {} WHERE file_uuid = $1",
|
||||
schema::table_name("videos")
|
||||
@@ -723,9 +724,10 @@ impl JobWorker {
|
||||
.fetch_one(self.db.pool())
|
||||
.await
|
||||
.unwrap_or(0);
|
||||
let proc_refs: Vec<&str> = all_procs.iter().map(|s| s.as_str()).collect();
|
||||
let _ = self
|
||||
.db
|
||||
.init_processing_status(&file_uuid, all_procs, total as u64)
|
||||
.init_processing_status(&file_uuid, proc_refs, total as u64)
|
||||
.await;
|
||||
let _ = sqlx::query(&format!(
|
||||
"UPDATE {} SET status = 'scanning' WHERE file_uuid = $1",
|
||||
|
||||
Reference in New Issue
Block a user