Only announce healthy status once a day.

This commit is contained in:
Ivaylo Novakov 2020-09-08 18:20:56 +02:00
parent ddf72ad850
commit 8235d75795
No known key found for this signature in database
GPG Key ID: 06B9354AB08BE9C6
1 changed files with 4 additions and 2 deletions

View File

@ -159,7 +159,9 @@ async def check_health():
await send_msg(client, message, file=file, force_notify=notifyTeam) await send_msg(client, message, file=file, force_notify=notifyTeam)
return return
# Send an informational heartbeat if all checks passed. # Send an informational heartbeat if all checks passed but only if it's in
# the first CHECK_HOURS hours of the day, essentially the first call.
if datetime.now().hour < CHECK_HOURS:
await send_msg(client, "Health checks passed: {}/{}\n".format(passed_checks, checks)) await send_msg(client, "Health checks passed: {}/{}\n".format(passed_checks, checks))