def __init__(self, index_name, host='localhost', port=6379, conn=None):
"""
Create a new Client for the given index_name, and optional host and port
If conn is not None, we employ an already existing redis connection
"""
self.index_name = index_name
self.redis = conn if conn is not None else Redis(
connection_pool=ConnectionPool(host=host, port=port))
评论列表
文章目录