Add SMART alert scheduler

This commit is contained in:
2026-02-07 22:46:31 +03:00
parent e3a1321d3f
commit 745a5171a1
3 changed files with 44 additions and 1 deletions

View File

@@ -4,7 +4,7 @@ from datetime import datetime
from app import bot, dp, cfg, ADMIN_ID
from keyboards import menu_kb
from services.docker import discover_containers, docker_watchdog
from services.alerts import monitor_resources
from services.alerts import monitor_resources, monitor_smart
from services.notify import notify
import state
import handlers.menu
@@ -32,6 +32,8 @@ async def main():
asyncio.create_task(docker_watchdog(state.DOCKER_MAP, notify, bot, ADMIN_ID))
if cfg.get("alerts", {}).get("enabled", True):
asyncio.create_task(monitor_resources(cfg, notify, bot, ADMIN_ID))
if cfg.get("alerts", {}).get("smart_enabled", True):
asyncio.create_task(monitor_smart(cfg, notify, bot, ADMIN_ID))
await notify_start()
await dp.start_polling(bot)