(self, base_url, timeout=60,
pool_connections=constants.DEFAULT_NUM_POOLS,
max_pool_size=constants.DEFAULT_MAX_POOL_SIZE)
| 69 | 'max_pool_size'] |
| 70 | |
| 71 | def __init__(self, base_url, timeout=60, |
| 72 | pool_connections=constants.DEFAULT_NUM_POOLS, |
| 73 | max_pool_size=constants.DEFAULT_MAX_POOL_SIZE): |
| 74 | self.npipe_path = base_url.replace('npipe://', '') |
| 75 | self.timeout = timeout |
| 76 | self.max_pool_size = max_pool_size |
| 77 | self.pools = RecentlyUsedContainer( |
| 78 | pool_connections, dispose_func=lambda p: p.close() |
| 79 | ) |
| 80 | super().__init__() |
| 81 | |
| 82 | def get_connection(self, url, proxies=None): |
| 83 | with self.pools.lock: |