diff --git a/CHANGELOG.md b/CHANGELOG.md index 18c39a1..5cda129 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,9 @@ -## v1.3.2-2 - 2023-07-xx +## v1.3.3 2023-07-04 ### Update * UserWSSession moved to crypto-ws-api pkg * Refactoring logging +* CheckStream(): fix log spamming on passed check +* Up requirements for crypto-ws-api to 1.0.1 ## v1.3.2 - 2023-06-29 ### Added for new features diff --git a/exchanges_wrapper/__init__.py b/exchanges_wrapper/__init__.py index 888ae6a..b7e2873 100644 --- a/exchanges_wrapper/__init__.py +++ b/exchanges_wrapper/__init__.py @@ -12,7 +12,7 @@ __contact__ = "https://github.com/DogsTailFarmer" __email__ = "jerry.fedorenko@yahoo.com" __credits__ = ["https://github.com/DanyaSWorlD"] -__version__ = "1.3.2-2" +__version__ = "1.3.3" from pathlib import Path import shutil diff --git a/exchanges_wrapper/exch_srv.py b/exchanges_wrapper/exch_srv.py index 379af67..ba31e87 100755 --- a/exchanges_wrapper/exch_srv.py +++ b/exchanges_wrapper/exch_srv.py @@ -907,11 +907,15 @@ async def StopStream(self, request: api_pb2.MarketRequest, async def CheckStream(self, request: api_pb2.MarketRequest, _context: grpc.aio.ServicerContext) -> api_pb2.SimpleResponse: - open_client = OpenClient.get_client(request.client_id) - client = open_client.client response = api_pb2.SimpleResponse() - response.success = bool(client.data_streams.get(request.trade_id)) - logger.debug(f"CheckStream request passed: {response.success} for {request.symbol} on {client.exchange}") + open_client = OpenClient.get_client(request.client_id) + if open_client: + client = open_client.client + response.success = bool(client.data_streams.get(request.trade_id)) + else: + response.success = False + if not response.success: + logger.warning(f"CheckStream request filed for {request.symbol}") return response diff --git a/pyproject.toml b/pyproject.toml index 0fb0a7a..abbc132 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,7 +25,7 @@ dependencies = [ "pyotp~=2.8.0", "simplejson==3.19.1", "shortuuid~=1.0.11", - "crypto_ws_api~=1.0.0", + "crypto_ws_api~=1.0.1", ] [tool.flit.module] diff --git a/requirements.txt b/requirements.txt index a96a706..b2c1873 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,4 +6,4 @@ idna==3.4 pyotp~=2.8.0 simplejson==3.19.1 shortuuid~=1.0.11 -crypto_ws_api~=1.0.0 \ No newline at end of file +crypto_ws_api~=1.0.1 \ No newline at end of file