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!({
|
let props = serde_json::json!({
|
||||||
|
"trace_id": row.trace_id,
|
||||||
"frame_count": row.frame_count,
|
"frame_count": row.frame_count,
|
||||||
"start_frame": row.start_f,
|
"start_frame": row.start_f,
|
||||||
"end_frame": row.end_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_pitch": (avg_pitch * 1000.0).round() / 1000.0,
|
||||||
"avg_roll": (avg_roll * 1000.0).round() / 1000.0,
|
"avg_roll": (avg_roll * 1000.0).round() / 1000.0,
|
||||||
"pose_count": pose_count,
|
"pose_count": pose_count,
|
||||||
|
"status": "pending",
|
||||||
});
|
});
|
||||||
|
|
||||||
sqlx::query(&format!(
|
sqlx::query(&format!(
|
||||||
@@ -662,8 +664,7 @@ async fn build_face_track_nodes_from_pg(
|
|||||||
VALUES ($1, $2, $3, $4, $5::jsonb)
|
VALUES ($1, $2, $3, $4, $5::jsonb)
|
||||||
ON CONFLICT (file_uuid, node_type, external_id)
|
ON CONFLICT (file_uuid, node_type, external_id)
|
||||||
DO UPDATE SET
|
DO UPDATE SET
|
||||||
properties = COALESCE(EXCLUDED.properties, tkg_nodes.properties),
|
properties = EXCLUDED.properties
|
||||||
label = COALESCE(NULLIF(EXCLUDED.label, ''), tkg_nodes.label)
|
|
||||||
"#,
|
"#,
|
||||||
nodes_table
|
nodes_table
|
||||||
))
|
))
|
||||||
@@ -2514,11 +2515,10 @@ async fn build_appearance_trace_nodes(
|
|||||||
r#"
|
r#"
|
||||||
INSERT INTO {} (node_type, external_id, file_uuid, label, properties)
|
INSERT INTO {} (node_type, external_id, file_uuid, label, properties)
|
||||||
VALUES ($1, $2, $3, $4, $5::jsonb)
|
VALUES ($1, $2, $3, $4, $5::jsonb)
|
||||||
ON CONFLICT (file_uuid, node_type, external_id)
|
ON CONFLICT (file_uuid, node_type, external_id)
|
||||||
DO UPDATE SET
|
DO UPDATE SET
|
||||||
properties = COALESCE(EXCLUDED.properties, tkg_nodes.properties),
|
properties = EXCLUDED.properties
|
||||||
label = COALESCE(NULLIF(EXCLUDED.label, ''), tkg_nodes.label)
|
"#,
|
||||||
"#,
|
|
||||||
nodes_table
|
nodes_table
|
||||||
))
|
))
|
||||||
.bind("appearance_trace")
|
.bind("appearance_trace")
|
||||||
|
|||||||
Reference in New Issue
Block a user