fix: revert grace period, increase poll interval to 500ms to prevent doubles without adding jitter

This commit is contained in:
M1 2026-03-18 14:27:38 +04:00
parent 5836c44228
commit d3ee0ef9d5
2 changed files with 2 additions and 2 deletions

View File

@ -48,7 +48,7 @@ export const internal = new Elysia({ prefix: "/internal", detail: { hide: true }
) last ON true
WHERE m.enabled = true
AND (last.checked_at IS NULL
OR last.checked_at < now() - (m.interval_s || ' seconds')::interval - interval '200ms')
OR last.checked_at < now() - (m.interval_s || ' seconds')::interval)
`;
return monitors;
})

View File

@ -41,6 +41,6 @@ async fn main() -> Result<()> {
Ok(n) => { if n > 0 { info!("Spawned {n} checks"); } },
Err(e) => error!("Check cycle failed: {e}"),
}
sleep(Duration::from_millis(50)).await;
sleep(Duration::from_millis(500)).await;
}
}