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:
parent
fdd5b4e0e2
commit
f539e0e414
3 changed files with 3 additions and 3 deletions
|
|
@ -231,7 +231,7 @@ export default function ScrapeAllAdminPage() {
|
||||||
const isStale =
|
const isStale =
|
||||||
r.status === "running" &&
|
r.status === "running" &&
|
||||||
heartbeatLag !== null &&
|
heartbeatLag !== null &&
|
||||||
heartbeatLag > 60;
|
heartbeatLag > 300;
|
||||||
const badge = SCRAPER_BADGE[r.scraper_type];
|
const badge = SCRAPER_BADGE[r.scraper_type];
|
||||||
const statusColor = STATUS_COLOR[r.status] ?? "#6b7280";
|
const statusColor = STATUS_COLOR[r.status] ?? "#6b7280";
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -361,7 +361,7 @@ export default function GeoScrapeAdminPage() {
|
||||||
const isStale =
|
const isStale =
|
||||||
j.status === "running" &&
|
j.status === "running" &&
|
||||||
heartbeatLag !== null &&
|
heartbeatLag !== null &&
|
||||||
heartbeatLag > 90;
|
heartbeatLag > 300;
|
||||||
const color = STATUS_COLOR[j.status] ?? "#6b7280";
|
const color = STATUS_COLOR[j.status] ?? "#6b7280";
|
||||||
return (
|
return (
|
||||||
<tr key={j.job_id} style={{ borderTop: "1px solid #f3f4f6" }}>
|
<tr key={j.job_id} style={{ borderTop: "1px solid #f3f4f6" }}>
|
||||||
|
|
|
||||||
|
|
@ -694,7 +694,7 @@ export default function ObjectiveEtlAdminPage() {
|
||||||
const isStale =
|
const isStale =
|
||||||
r.status === "running" &&
|
r.status === "running" &&
|
||||||
heartbeatLag !== null &&
|
heartbeatLag !== null &&
|
||||||
heartbeatLag > 60;
|
heartbeatLag > 300;
|
||||||
const statusColor =
|
const statusColor =
|
||||||
r.status === "done"
|
r.status === "done"
|
||||||
? "#16a34a"
|
? "#16a34a"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue