Skip to content

Commit 57a4276

Browse files
committed
feat: expose connection limit on AsyncClient
before exposure of that parameter connection limits defaulted to 100
1 parent 7918d0d commit 57a4276

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

aleph_alpha_client/aleph_alpha_client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -833,6 +833,7 @@ def __init__(
833833
self,
834834
token: str,
835835
host: str,
836+
limit: int = 100,
836837
hosting: Optional[str] = None,
837838
request_timeout_seconds: int = DEFAULT_REQUEST_TIMEOUT,
838839
total_retries: int = 8,
@@ -855,7 +856,7 @@ def __init__(
855856
start_timeout=0.25,
856857
statuses=set(RETRY_STATUS_CODES),
857858
)
858-
connector = aiohttp.TCPConnector(verify_ssl=verify_ssl)
859+
connector = aiohttp.TCPConnector(verify_ssl=verify_ssl, limit=limit)
859860
self.session = RetryClient(
860861
trust_env=True, # same behaviour as requests/(Sync)Client wrt. http_proxy
861862
raise_for_status=False,

0 commit comments

Comments
 (0)