fix: add trace_id and status to face_track nodes, force update properties on rebuild
This commit is contained in:
@@ -641,6 +641,7 @@ async fn build_face_track_nodes_from_pg(
|
||||
};
|
||||
|
||||
let props = serde_json::json!({
|
||||
"trace_id": row.trace_id,
|
||||
"frame_count": row.frame_count,
|
||||
"start_frame": row.start_f,
|
||||
"end_frame": row.end_f,
|
||||
@@ -654,6 +655,7 @@ async fn build_face_track_nodes_from_pg(
|
||||
"avg_pitch": (avg_pitch * 1000.0).round() / 1000.0,
|
||||
"avg_roll": (avg_roll * 1000.0).round() / 1000.0,
|
||||
"pose_count": pose_count,
|
||||
"status": "pending",
|
||||
});
|
||||
|
||||
sqlx::query(&format!(
|
||||
@@ -662,8 +664,7 @@ async fn build_face_track_nodes_from_pg(
|
||||
VALUES ($1, $2, $3, $4, $5::jsonb)
|
||||
ON CONFLICT (file_uuid, node_type, external_id)
|
||||
DO UPDATE SET
|
||||
properties = COALESCE(EXCLUDED.properties, tkg_nodes.properties),
|
||||
label = COALESCE(NULLIF(EXCLUDED.label, ''), tkg_nodes.label)
|
||||
properties = EXCLUDED.properties
|
||||
"#,
|
||||
nodes_table
|
||||
))
|
||||
@@ -2514,11 +2515,10 @@ async fn build_appearance_trace_nodes(
|
||||
r#"
|
||||
INSERT INTO {} (node_type, external_id, file_uuid, label, properties)
|
||||
VALUES ($1, $2, $3, $4, $5::jsonb)
|
||||
ON CONFLICT (file_uuid, node_type, external_id)
|
||||
DO UPDATE SET
|
||||
properties = COALESCE(EXCLUDED.properties, tkg_nodes.properties),
|
||||
label = COALESCE(NULLIF(EXCLUDED.label, ''), tkg_nodes.label)
|
||||
"#,
|
||||
ON CONFLICT (file_uuid, node_type, external_id)
|
||||
DO UPDATE SET
|
||||
properties = EXCLUDED.properties
|
||||
"#,
|
||||
nodes_table
|
||||
))
|
||||
.bind("appearance_trace")
|
||||
|
||||
Reference in New Issue
Block a user