fix(backend): a session or bot that fails to start is retried and the failure is logged

This commit is contained in:
hh committed 2026-10-19 02:29:19 +00:00
1 parent 42469eb9f1
commit 4ce9c5d340
3 files changed
+46 -13

No files matched your search

+3 -1
View File
@@ -20,8 +20,10 @@ RETRY_INTERVAL = 300
async def _retry_loop(registry: BotRegistry) -> None:
while True:
await asyncio.sleep(RETRY_INTERVAL)
with contextlib.suppress(Exception):
try:
await registry.sync()
except Exception:
logger.exception("[red]Bot sync failed[/]")
def _change_listener(registry: BotRegistry, tasks: set[asyncio.Task]) -> Listener: