def __init__(self,
                 connect_kwargs,
                 max_idle_connections=1,
                 max_recycle_sec=3600,
                 max_open_connections=0,
                 io_loop=None,
                 ):
        """
        :param dict connect_kwargs: kwargs for tornado_mysql.connect()
        :param int max_idle_connections: Max number of keeping connections.
        :param int max_recycle_sec: How long connections are recycled.
        :param int max_open_connections:
            Max number of opened connections. 0 means no limit.
        """
        connect_kwargs['autocommit'] = True
        self.io_loop = io_loop or IOLoop.current()
        self.connect_kwargs = connect_kwargs
        self.max_idle = max_idle_connections
        self.max_open = max_open_connections
        self.max_recycle_sec = max_recycle_sec

        self._opened_conns = 0
        self._free_conn = deque()
        self._waitings = deque()
def __init__ ( self , connect_kwargs , max_idle_connections = 1 , max_recycle_sec = 3600 , max_open_connections = 0 , io_loop = None , ) : connect_kwargs [ 'autocommit' ] = True self . io_loop = io_loop or IOLoop . current ( ) self . connect_kwargs = connect_kwargs self . max_idle = max_idle_connections self . max_open = max_open_connections self . max_recycle_sec = max_recycle_sec self . _opened_conns = 0 self . _free_conn = deque ( ) self . _waitings = deque ( )
:param dict connect_kwargs: kwargs for tornado_mysql.connect()
        :param int max_idle_connections: Max number of keeping connections.
        :param int max_recycle_sec: How long connections are recycled.
        :param int max_open_connections:
            Max number of opened connections. 0 means no limit.