コード例 #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
ファイル: connection.py プロジェクト: msfuko/CSTools
 def __init__(self, service, region='us-east-1'):
     ConnectionPool.__init__(self, 10)
     self.service = service
     self.region = region
コード例 #6
0
ファイル: service.py プロジェクト: Saectar/foofind-web
 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
ファイル: service.py プロジェクト: Saectar/foofind-web
 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