fix: add 200ms grace period to due query to prevent double-pings
This commit is contained in:
@@ -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;
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user