예제 #1
0
파일: pool.py 프로젝트: cenk/inbox
 def __init__(self, account_id, num_connections=5):
     log.info('Creating connection pool for account {0} with {1}\
         connections'.format(account_id, num_connections))
     self.account_id = account_id
     self._set_account_info()
     # 1200s == 20min
     ConnectionPool.__init__(self, num_connections, keepalive=1200)
예제 #2
0
파일: crispin.py 프로젝트: nvdnkpr/inbox
 def __init__(self, account_id, num_connections, readonly):
     log.info('Creating Crispin connection pool for account {} with {} '
              'connections'.format(account_id, num_connections))
     self.account_id = account_id
     self.readonly = readonly
     self._set_account_info()
     # 1200s == 20min
     ConnectionPool.__init__(self, num_connections, keepalive=1200)
예제 #3
0
파일: postel.py 프로젝트: nvdnkpr/inbox
    def __init__(self, account_id, num_connections, debug=False):
        self.log = get_logger(account_id, 'sendmail: connection_pool')
        self.log.info('Creating SMTP connection pool for account {0} with {1} '
                      'connections'.format(account_id, num_connections))

        self.account_id = account_id
        self._set_account_info()

        self.debug = debug

        # 1200s == 20min
        ConnectionPool.__init__(self, num_connections, keepalive=1200)
예제 #4
0
파일: postel.py 프로젝트: jre21/inbox
    def __init__(self, account_id, num_connections=5, debug=False):
        self.log = get_logger(account_id, 'sendmail: connection_pool')
        self.log.info('Creating SMTP connection pool for account {0} with {1} '
                      'connections'.format(account_id, num_connections))

        self.account_id = account_id
        self._set_account_info()

        self.debug = debug

        self.auth_handlers = {'OAuth': self.smtp_oauth,
                              'Password': self.smtp_password}

        # 1200s == 20min
        ConnectionPool.__init__(self, num_connections, keepalive=1200)
예제 #5
0
 def __init__(self, service, region='us-east-1'):
     ConnectionPool.__init__(self, 10)
     self.service = service
     self.region = region
예제 #6
0
 def __init__(self, pool_size, server, version, redis_timeout):
     ConnectionPool.__init__(self, pool_size, keepalive=redis_timeout/2)
     self.server = server
     self.version = version
예제 #7
0
 def __init__(self, pool_size, server, max_max_query_time, socket_timeout):
     ConnectionPool.__init__(self, pool_size, keepalive=socket_timeout/2)
     self.server = server
     self.max_max_query_time = max_max_query_time
     self.socket_timeout = socket_timeout
예제 #8
0
 def __init__(self, service, region='us-east-1'):
     ConnectionPool.__init__(self, 10)
     self.service = service
     self.region = region