removed sleep calls, better channel sending

This commit is contained in:
Timothy Pogue
2022-10-22 19:02:05 -06:00
parent 2b6d00dde4
commit 3d7a311caa
5 changed files with 31 additions and 22 deletions

View File

@@ -270,6 +270,11 @@ class ExternalMessageConsumer:
logger.debug(f"Connection to {channel} still alive...")
continue
except (websockets.exceptions.ConnectionClosed):
# Just eat the error and continue reconnecting
logger.warning(f"Disconnection in {channel} - retrying in {self.sleep_time}s")
await asyncio.sleep(self.sleep_time)
break
except Exception as e:
logger.warning(f"Ping error {channel} - retrying in {self.sleep_time}s")
logger.debug(e, exc_info=e)