feat: add container monitor & telegram alerts
Added asyncio monitoring task to main.py to watch Docker container state transitions and send Telegram notifications on failures.
This commit is contained in:
@@ -5,12 +5,10 @@ import platform
|
||||
import time
|
||||
import httpx
|
||||
from fastapi import APIRouter
|
||||
from config import TELEGRAM_BOT_TOKEN, TELEGRAM_CHAT_ID
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
TELEGRAM_BOT_TOKEN = os.environ.get("TELEGRAM_BOT_TOKEN", "")
|
||||
TELEGRAM_CHAT_ID = os.environ.get("TELEGRAM_CHAT_ID", "")
|
||||
|
||||
|
||||
@router.post("/notify")
|
||||
async def send_notification(body: dict):
|
||||
|
||||
Reference in New Issue
Block a user