fix: sauberer Shutdown (Telegram Updater, CancelledError), WhatsApp-Polling auf 5s
This commit is contained in:
@@ -72,6 +72,13 @@ class TelegramChannel(BaseChannel):
|
||||
|
||||
async def stop(self) -> None:
|
||||
if self._app:
|
||||
# Korrekte PTB v20+ Shutdown-Reihenfolge:
|
||||
# Erst Updater stoppen, dann Application stoppen/shutdown
|
||||
try:
|
||||
if self._app.updater.running:
|
||||
await self._app.updater.stop()
|
||||
except Exception:
|
||||
pass
|
||||
await self._app.stop()
|
||||
await self._app.shutdown()
|
||||
logger.info("Telegram channel stopped")
|
||||
|
||||
Reference in New Issue
Block a user