fix(backend): a session or bot that fails to start is retried and the failure is logged
This commit is contained in:
1 parent
42469eb9f1
commit
4ce9c5d340
3 files changed
+46
-13
No files matched your search
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user