Add quiet hours, health checks, and logging
This commit is contained in:
@@ -144,8 +144,20 @@ async def docker_watchdog(container_map, notify, bot, chat_id):
|
||||
reply_markup=kb,
|
||||
)
|
||||
elif health not in ("healthy", "n/a"):
|
||||
await notify(bot, chat_id, f"⚠️ {alias} health: {health}")
|
||||
await notify(
|
||||
bot,
|
||||
chat_id,
|
||||
f"⚠️ {alias} health: {health}",
|
||||
level="warn",
|
||||
key=f"docker_health:{alias}",
|
||||
)
|
||||
else:
|
||||
await notify(bot, chat_id, f"🐳 {alias}: {status}")
|
||||
await notify(
|
||||
bot,
|
||||
chat_id,
|
||||
f"🐳 {alias}: {status}",
|
||||
level="info",
|
||||
key=f"docker_status:{alias}:{status}",
|
||||
)
|
||||
last[alias] = (status, health)
|
||||
await asyncio.sleep(120)
|
||||
|
||||
Reference in New Issue
Block a user