def __init__(self, host, port, password=None, db_number=None,
maxconn=None, maxconn_timeout=None):
self._pool = redis.BlockingConnectionPool(
host=host,
port=port,
password=password,
db=db_number or 0,
max_connections=maxconn or 50,
timeout=maxconn_timeout or 20
)
self._client = redis.StrictRedis(
connection_pool=self._pool
)
评论列表
文章目录