Only announce healthy status once a day.
This commit is contained in:
parent
ddf72ad850
commit
8235d75795
|
@ -159,8 +159,10 @@ 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
|
||||||
await send_msg(client, "Health checks passed: {}/{}\n".format(passed_checks, checks))
|
# 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))
|
||||||
|
|
||||||
|
|
||||||
client.run(bot_token)
|
client.run(bot_token)
|
||||||
|
|
Reference in New Issue