Files
wiseclaw/backend/app/runtime.py

15 lines
365 B
Python

from contextlib import suppress
from app.telegram.bot import TelegramBotService
class RuntimeServices:
def __init__(self) -> None:
self.telegram_bot: TelegramBotService | None = None
async def shutdown(self) -> None:
if self.telegram_bot is not None:
with suppress(Exception):
await self.telegram_bot.stop()