fix: face_detections INSERT in pipeline, add dependency graph doc
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user