From d262755531f3f4161a905b8499aea03bdcdeb1e9 Mon Sep 17 00:00:00 2001 From: m5l14i11 Date: Fri, 13 Sep 2024 12:00:30 +0300 Subject: [PATCH] upd --- exchange/_bybit_ws.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/exchange/_bybit_ws.py b/exchange/_bybit_ws.py index 0285629d..71e5589c 100644 --- a/exchange/_bybit_ws.py +++ b/exchange/_bybit_ws.py @@ -15,6 +15,7 @@ connect_exceptions = (ConnectionError, ConnectionClosedError, asyncio.TimeoutError) + class BybitWS(AbstractWS): SUBSCRIBE_OPERATION = "subscribe" UNSUBSCRIBE_OPERATION = "unsubscribe" @@ -137,6 +138,8 @@ async def _send_message(self, operation): try: await asyncio.wait_for(self.ws.send(json.dumps(message)), timeout=5) + + logger.info(f"{operation.capitalize()} to: {message}") except asyncio.TimeoutError: logger.error("Subscription request timed out") except Exception as e: