fix(admin): bump UI stale threshold 60/90s -> 300s

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.
This commit is contained in:
lekss361 2026-05-11 16:49:37 +03:00
parent fdd5b4e0e2
commit f539e0e414
3 changed files with 3 additions and 3 deletions

View file

@ -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 (

View file

@ -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 (
<tr key={j.job_id} style={{ borderTop: "1px solid #f3f4f6" }}>

View file

@ -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"