fix: Telegram-Polling-Task sauber canceln + WhatsApp CancelledError beim Shutdown unterdrücken

This commit is contained in:
2026-03-17 15:01:38 +01:00
parent b880cabcde
commit 5f9d6b327b
2 changed files with 15 additions and 4 deletions

View File

@@ -1,5 +1,6 @@
from __future__ import annotations
import asyncio
import logging
from typing import Any, Callable, Awaitable
@@ -98,6 +99,8 @@ class WhatsAppChannel(BaseChannel):
await self._process_notification(body)
if receipt_id:
await self._delete_notification(receipt_id)
except asyncio.CancelledError:
raise
except Exception as exc:
logger.error("WhatsApp poll error: %s", exc)