fix: revert grace period, increase poll interval to 500ms to prevent doubles without adding jitter
This commit is contained in:
parent
5836c44228
commit
d3ee0ef9d5
|
|
@ -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;
|
||||
})
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue