reduced the places where we probe hourly tables
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2026-01-21 11:44:13 +11:00
parent b77f8671da
commit 32d4a352dc
2 changed files with 5 additions and 21 deletions

View File

@@ -137,15 +137,9 @@ ORDER BY snapshot_time ASC
if err := db.ValidateTableName(t.Table); err != nil {
continue
}
if t.Count.Valid {
if t.Count.Int64 <= 0 {
continue
}
} else {
hasRows, err := db.TableHasRows(ctx, dbConn, t.Table)
if err != nil || !hasRows {
continue
}
// Trust snapshot_count if present; otherwise optimistically include to avoid long probes.
if t.Count.Valid && t.Count.Int64 <= 0 {
continue
}
tables = append(tables, t)
}