From f539e0e414fffb80a2b73b92e01aa6886a0dd22b Mon Sep 17 00:00:00 2001 From: lekss361 Date: Mon, 11 May 2026 16:49:37 +0300 Subject: [PATCH] fix(admin): bump UI stale threshold 60/90s -> 300s MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 'stale' badge in /admin/scrape/* tables was a UI-only label computed as Date.now() - heartbeat_at > 60s (90s for geo). Heartbeats naturally lag past 60s during WAF backoff (30s) or NSPD HTTP timeout (15s) — every page render flashed running jobs as 'stale' even though they were processing. 300s threshold matches the real auto-resume threshold in the worker (jobs are zombies only after >5 min of silence). Less false-positive churn in the UI. --- frontend/src/app/admin/scrape/all/page.tsx | 2 +- frontend/src/app/admin/scrape/geo/page.tsx | 2 +- frontend/src/app/admin/scrape/objective/page.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/app/admin/scrape/all/page.tsx b/frontend/src/app/admin/scrape/all/page.tsx index c97150ef..c03eb4c5 100644 --- a/frontend/src/app/admin/scrape/all/page.tsx +++ b/frontend/src/app/admin/scrape/all/page.tsx @@ -231,7 +231,7 @@ export default function ScrapeAllAdminPage() { const isStale = r.status === "running" && heartbeatLag !== null && - heartbeatLag > 60; + heartbeatLag > 300; const badge = SCRAPER_BADGE[r.scraper_type]; const statusColor = STATUS_COLOR[r.status] ?? "#6b7280"; return ( diff --git a/frontend/src/app/admin/scrape/geo/page.tsx b/frontend/src/app/admin/scrape/geo/page.tsx index 69f7636c..bd59f648 100644 --- a/frontend/src/app/admin/scrape/geo/page.tsx +++ b/frontend/src/app/admin/scrape/geo/page.tsx @@ -361,7 +361,7 @@ export default function GeoScrapeAdminPage() { const isStale = j.status === "running" && heartbeatLag !== null && - heartbeatLag > 90; + heartbeatLag > 300; const color = STATUS_COLOR[j.status] ?? "#6b7280"; return ( diff --git a/frontend/src/app/admin/scrape/objective/page.tsx b/frontend/src/app/admin/scrape/objective/page.tsx index 40be302a..424297bd 100644 --- a/frontend/src/app/admin/scrape/objective/page.tsx +++ b/frontend/src/app/admin/scrape/objective/page.tsx @@ -694,7 +694,7 @@ export default function ObjectiveEtlAdminPage() { const isStale = r.status === "running" && heartbeatLag !== null && - heartbeatLag > 60; + heartbeatLag > 300; const statusColor = r.status === "done" ? "#16a34a"