detailed data for verifications
This commit is contained in:
@@ -282,7 +282,11 @@ pub async fn push(
|
||||
verify_time_ms = COALESCE(videos.verify_time_ms, 0) + $3,
|
||||
annotation_count=$4, raw_json=$5,
|
||||
primary_annotator=$6, annotation_time_ms=$7, annotated_at=now(),
|
||||
imported_count = COALESCE(NULLIF($8, 0), videos.imported_count),
|
||||
-- imported_count is the ORIGINAL auto-imported baseline (set at ingest).
|
||||
-- Keep it fixed once set: verification/re-verification must NOT fold added
|
||||
-- annotations into it (otherwise "imported 200" would drift to 210). Only
|
||||
-- establish it from the claim-time count if it was never set.
|
||||
imported_count = COALESCE(NULLIF(videos.imported_count, 0), $8),
|
||||
claimed_by=NULL, claimed_at=NULL, lease_expires_at=NULL
|
||||
WHERE id=$1"#,
|
||||
)
|
||||
@@ -299,7 +303,16 @@ pub async fn push(
|
||||
.map_err(err)?;
|
||||
tx.commit().await.map_err(err)?;
|
||||
|
||||
log_event(&s.db, id, &user.username, "push", json!({ "verify_time_ms": verify_time_ms })).await;
|
||||
// Record this pass's resulting annotation count so the dashboard can show a
|
||||
// per-pass breakdown (imported baseline → verify Δ → re-verify Δ …), not just a net.
|
||||
log_event(
|
||||
&s.db,
|
||||
id,
|
||||
&user.username,
|
||||
"push",
|
||||
json!({ "verify_time_ms": verify_time_ms, "annotation_count": ann_count }),
|
||||
)
|
||||
.await;
|
||||
|
||||
// Mark project activity + auto-resume its timer (a verify/re-verify restarts it).
|
||||
let _ = sqlx::query(
|
||||
|
||||
Reference in New Issue
Block a user