Skip to content

Commit

Permalink
2.1.11
Browse files Browse the repository at this point in the history
  • Loading branch information
DogsTailFarmer committed Apr 19, 2024
1 parent eea8171 commit 1745592
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.1.11 2024-04-19
### Update
* Some minor improvements

## 2.1.10 2024-04-16
### Update
* `Bitfinex`: `client.fetch_order()`: searching on `origin_client_order_id` also
Expand Down
2 changes: 1 addition & 1 deletion exchanges_wrapper/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
__contact__ = "https://github.com/DogsTailFarmer"
__email__ = "[email protected]"
__credits__ = ["https://github.com/DanyaSWorlD"]
__version__ = "2.1.10"
__version__ = "2.1.11"

from pathlib import Path
import shutil
Expand Down
8 changes: 6 additions & 2 deletions exchanges_wrapper/exch_srv.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,14 @@ async def send_request(self, client_method_name, request, rate_limit=False, **kw
if rate_limit:
await self.rate_limit_control(open_client)
try:
res = await getattr(client, client_method_name)(**kwargs)
except (asyncio.CancelledError, asyncio.exceptions.CancelledError):
res = await asyncio.wait_for(getattr(client, client_method_name)(**kwargs), timeout=HEARTBEAT * 60)
except asyncio.exceptions.CancelledError:
msg = f"{msg_header} Server Shutdown"
raise GRPCError(status=Status.UNAVAILABLE, message=msg)
except asyncio.exceptions.TimeoutError:
msg = f"{msg_header} timeout error"
logger.warning(msg)
raise GRPCError(status=Status.OUT_OF_RANGE, message=msg)
except (errors.RateLimitReached, errors.QueryCanceled) as ex:
Martin.rate_limit_reached_time = time.time()
msg = f"{msg_header} RateLimitReached: {ex}"
Expand Down

0 comments on commit 1745592

Please sign in to comment.