feat: page long and truncated lists #117

Merged
Sebi merged 2 commits from feat/paging into main 2026-11-22 20:46:18 +00:00
Showing only changes of commit 98fb5d3a82 - Show all commits
+3 -1
View File
@@ -88,7 +88,9 @@ func Collect(ctx context.Context, pool *pgxpool.Pool) (Stats, error) {
rows, err = pool.Query(ctx, `
SELECT j.job_id, j.proc_name, coalesce(j.hypertable_name, ''), coalesce(st.last_run_status, ''),
st.last_run_started_at, st.next_start, coalesce(st.total_failures, 0)
-- A running job reports -infinity as its next start.
nullif(nullif(st.last_run_started_at, '-infinity'), 'infinity'),
nullif(nullif(st.next_start, '-infinity'), 'infinity'), coalesce(st.total_failures, 0)
FROM timescaledb_information.jobs j
LEFT JOIN timescaledb_information.job_stats st USING (job_id)
WHERE j.proc_name LIKE 'policy_%' AND j.proc_name <> 'policy_telemetry'