real fix for reconnecting
This commit is contained in:
parent
6d0dfd4dc8
commit
07aa206f71
@ -205,14 +205,14 @@ class ExternalMessageConsumer:
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
except websockets.exceptions.ConnectionClosedOK:
|
except websockets.exceptions.ConnectionClosedOK:
|
||||||
# Successfully closed, just end
|
# Successfully closed, just keep trying to connect again indefinitely
|
||||||
return
|
continue
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
# An unforseen error has occurred, log and stop
|
# An unforseen error has occurred, log and stop
|
||||||
logger.error("Unexpected error has occurred:")
|
logger.error("Unexpected error has occurred:")
|
||||||
logger.exception(e)
|
logger.exception(e)
|
||||||
break
|
continue
|
||||||
|
|
||||||
async def _receive_messages(
|
async def _receive_messages(
|
||||||
self,
|
self,
|
||||||
@ -256,7 +256,7 @@ class ExternalMessageConsumer:
|
|||||||
f"Ping error {channel} - retrying in {self.sleep_time}s")
|
f"Ping error {channel} - retrying in {self.sleep_time}s")
|
||||||
await asyncio.sleep(self.sleep_time)
|
await asyncio.sleep(self.sleep_time)
|
||||||
|
|
||||||
continue
|
break
|
||||||
|
|
||||||
def handle_producer_message(self, producer: Dict[str, Any], message: Dict[str, Any]):
|
def handle_producer_message(self, producer: Dict[str, Any], message: Dict[str, Any]):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user