fix: face_detections INSERT in pipeline, add dependency graph doc

This commit is contained in:
Accusys
2026-05-17 22:16:20 +08:00
parent d6c8930f84
commit a880c80556
4 changed files with 149 additions and 24 deletions
+15
View File
@@ -2193,6 +2193,21 @@ impl PostgresDb {
Ok(())
}
pub async fn store_face_detections_batch(
&self, uuid: &str, detections: &[(i64, f64, i32, i32, i32, i32, f32)]
) -> Result<()> {
let table = schema::table_name("face_detections");
for (frame, ts, x, y, w, h, conf) in detections {
sqlx::query(&format!(
"INSERT INTO {} (file_uuid, frame_number, timestamp_secs, x, y, width, height, confidence) \
VALUES ($1, $2, $3, $4, $5, $6, $7, $8) ON CONFLICT DO NOTHING", table
))
.bind(uuid).bind(frame).bind(ts).bind(x).bind(y).bind(w).bind(h).bind(conf)
.execute(&self.pool).await?;
}
Ok(())
}
pub async fn store_scene_pre_chunks_batch(&self, uuid: &str, scenes: &[(i64, i64, i64, f64, f64, serde_json::Value)]) -> Result<()> {
let table = schema::table_name("pre_chunks");
for (_i, _sf, _ef, start, end, data) in scenes {