示例#1
0
 def __init__(self, host, port, user, passwd, size=None):
     log.debug("INIT: Initializing pool of size %d, host %s,"
               " port %d, user %s", size, host, port, user)
     ObjectPool.__init__(self, size=size)
     self.host = host
     self.port = port
     self.user = user
     self.passwd = passwd
示例#2
0
 def __init__(self, host, port, user, passwd, size=None):
     log.debug(
         "INIT: Initializing pool of size %d, host %s,"
         " port %d, user %s", size, host, port, user)
     ObjectPool.__init__(self, size=size)
     self.host = host
     self.port = port
     self.user = user
     self.passwd = passwd
示例#3
0
文件: http.py 项目: dionyziz/objpool
    def __init__(self, scheme, netloc, size=None):
        log.debug("INIT-POOL: Initializing pool of size %d, scheme: %s, " \
                  "netloc: %s", size, scheme, netloc)
        ObjectPool.__init__(self, size=size)

        connection_class = self._scheme_to_class.get(scheme, None)
        if connection_class is None:
            m = 'Unsupported scheme: %s' % (scheme,)
            raise ValueError(m)

        self.connection_class = connection_class
        self.scheme = scheme
        self.netloc = netloc
示例#4
0
 def __init__(self, **kw):
     ObjectPool.__init__(self, size=kw["synnefo_poolsize"])
     kw.pop("synnefo_poolsize")
     self._connection_args = kw
示例#5
0
 def __init__(self, **kw):
     ObjectPool.__init__(self, size=kw["synnefo_poolsize"])
     kw.pop("synnefo_poolsize")
     self._connection_args = kw