Commit 7071e725 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

rpc: Remove thread-local storage with HTTP pool



The HTTP pool is no longer used.
Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 00976304
......@@ -124,34 +124,6 @@ def _ConfigRpcCurl(curl):
curl.setopt(pycurl.CONNECTTIMEOUT, _RPC_CONNECT_TIMEOUT)
# Aliasing this module avoids the following warning by epydoc: "Warning: No
# information available for ganeti.rpc._RpcThreadLocal's base threading.local"
_threading = threading
class _RpcThreadLocal(_threading.local):
def GetHttpClientPool(self):
"""Returns a per-thread HTTP client pool.
@rtype: L{http.client.HttpClientPool}
"""
try:
pool = self.hcp
except AttributeError:
pool = http.client.HttpClientPool(_ConfigRpcCurl)
self.hcp = pool
return pool
# Remove module alias (see above)
del _threading
_thread_local = _RpcThreadLocal()
def _RpcTimeout(secs):
"""Timeout decorator.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment