Skip to content
This repository was archived by the owner on Mar 13, 2022. It is now read-only.

Commit 5faa764

Browse files
committed
Allow setting maxsize for PoolManager
1 parent 26cb526 commit 5faa764

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

configuration.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@
3030

3131
class ConfigurationObject(object):
3232
"""
33-
NOTE: This class is auto generated by the swagger code generator program.
34-
Ref: https://github.com/swagger-api/swagger-codegen
35-
Do not edit the class manually.
33+
Configuration options for RESTClientObject
3634
"""
3735

3836
def __init__(self):
@@ -85,6 +83,12 @@ def __init__(self):
8583
# Set this to True/False to enable/disable SSL hostname verification.
8684
self.assert_hostname = None
8785

86+
# urllib3 connection pool's maximum number of connections saved
87+
# per pool. Increasing this is useful for cases when you are
88+
# making a lot of possibly parallel requests to the same host,
89+
# which is often the case here.
90+
self.connection_pool_maxsize = 1
91+
8892
@property
8993
def logger_file(self):
9094
"""

rest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ def __init__(self, pools_size=4, config=configuration):
9797
'ca_certs': ca_certs,
9898
'cert_file': cert_file,
9999
'key_file': key_file,
100+
'maxsize': config.connection_pool_maxsize,
100101
}
101102

102103
if config.assert_hostname is not None:

0 commit comments

Comments
 (0)