fix: add 200ms grace period to due query to prevent double-pings
This commit is contained in:
parent
6882162d7f
commit
5836c44228
|
|
@ -48,7 +48,7 @@ export const internal = new Elysia({ prefix: "/internal", detail: { hide: true }
|
||||||
) last ON true
|
) last ON true
|
||||||
WHERE m.enabled = true
|
WHERE m.enabled = true
|
||||||
AND (last.checked_at IS NULL
|
AND (last.checked_at IS NULL
|
||||||
OR last.checked_at < now() - (m.interval_s || ' seconds')::interval)
|
OR last.checked_at < now() - (m.interval_s || ' seconds')::interval - interval '200ms')
|
||||||
`;
|
`;
|
||||||
return monitors;
|
return monitors;
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue