diff options
author | Joffrey F <joffrey@docker.com> | 2016-10-04 12:19:33 -0700 |
---|---|---|
committer | Joffrey F <joffrey@docker.com> | 2016-10-04 12:19:33 -0700 |
commit | b65de73afea947cb65cc79c58acf414604ea6b16 (patch) | |
tree | bd485d0fe2ba359c0eeb9dbab38cf21712fe86dd | |
parent | 8239032463899af665b690aa0890941c1909f399 (diff) | |
download | docker-py-b65de73afea947cb65cc79c58acf414604ea6b16.tar.gz |
Update adapters to use pool_connections instead of num_pools
Signed-off-by: Joffrey F <joffrey@docker.com>
-rw-r--r-- | docker/client.py | 4 | ||||
-rw-r--r-- | docker/transport/npipeconn.py | 4 | ||||
-rw-r--r-- | docker/transport/unixconn.py | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/docker/client.py b/docker/client.py index c16f314..aba066b 100644 --- a/docker/client.py +++ b/docker/client.py @@ -60,7 +60,7 @@ class Client( ) if base_url.startswith('http+unix://'): self._custom_adapter = UnixAdapter( - base_url, timeout, num_pools=num_pools + base_url, timeout, pool_connections=num_pools ) self.mount('http+docker://', self._custom_adapter) self._unmount('http://', 'https://') @@ -72,7 +72,7 @@ class Client( ) try: self._custom_adapter = NpipeAdapter( - base_url, timeout, num_pools=num_pools + base_url, timeout, pool_connections=num_pools ) except NameError: raise errors.DockerException( diff --git a/docker/transport/npipeconn.py b/docker/transport/npipeconn.py index 917fa8b..984049c 100644 --- a/docker/transport/npipeconn.py +++ b/docker/transport/npipeconn.py @@ -49,11 +49,11 @@ class NpipeHTTPConnectionPool(urllib3.connectionpool.HTTPConnectionPool): class NpipeAdapter(requests.adapters.HTTPAdapter): def __init__(self, base_url, timeout=60, - num_pools=constants.DEFAULT_NUM_POOLS): + pool_connections=constants.DEFAULT_NUM_POOLS): self.npipe_path = base_url.replace('npipe://', '') self.timeout = timeout self.pools = RecentlyUsedContainer( - num_pools, dispose_func=lambda p: p.close() + pool_connections, dispose_func=lambda p: p.close() ) super(NpipeAdapter, self).__init__() diff --git a/docker/transport/unixconn.py b/docker/transport/unixconn.py index b7905a0..978c87a 100644 --- a/docker/transport/unixconn.py +++ b/docker/transport/unixconn.py @@ -51,14 +51,14 @@ class UnixHTTPConnectionPool(urllib3.connectionpool.HTTPConnectionPool): class UnixAdapter(requests.adapters.HTTPAdapter): def __init__(self, socket_url, timeout=60, - num_pools=constants.DEFAULT_NUM_POOLS): + pool_connections=constants.DEFAULT_NUM_POOLS): socket_path = socket_url.replace('http+unix://', '') if not socket_path.startswith('/'): socket_path = '/' + socket_path self.socket_path = socket_path self.timeout = timeout self.pools = RecentlyUsedContainer( - num_pools, dispose_func=lambda p: p.close() + pool_connections, dispose_func=lambda p: p.close() ) super(UnixAdapter, self).__init__() |