fix non-deactivating error
This commit is contained in:
parent
df33dcd00c
commit
c45c6992ae
8 changed files with 18 additions and 13 deletions
|
|
@ -168,7 +168,12 @@ class TelegramBot:
|
|||
for handler in self.app_handler.handlers.values():
|
||||
handler.context = self.app_handler.context
|
||||
applications = self.app_handler.load_applications()
|
||||
failed = [app for app in applications.values() if not app.get("success") and app.get("retries", 0) < max_retries]
|
||||
failed = [
|
||||
app for app in applications.values()
|
||||
if not app.get("success")
|
||||
and app.get("retries", 0) < max_retries
|
||||
and not app.get("deactivated", False)
|
||||
]
|
||||
await self._send_message(f"🔄 Retrying {len(failed)} failed applications (max retries: {max_retries})...")
|
||||
if not failed:
|
||||
await self._send_message("✅ No failed applications to retry (or all reached max retries).")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue