|
@@ -98,13 +98,11 @@ def es_query(title: str, publish_time: int):
|
|
|
def redis_client(cfg=None):
|
|
|
if cfg is None:
|
|
|
cfg = redis_conf
|
|
|
- pool = redis.ConnectionPool(
|
|
|
- host=cfg['host'],
|
|
|
- port=cfg['port'],
|
|
|
- password=cfg['pwd'],
|
|
|
- db=cfg['db']
|
|
|
- )
|
|
|
- return redis.Redis(connection_pool=pool, decode_responses=True)
|
|
|
+
|
|
|
+ return redis.StrictRedis(host=cfg['host'],
|
|
|
+ port=cfg['port'],
|
|
|
+ password=cfg['pwd'],
|
|
|
+ db=cfg['db'], decode_responses=True)
|
|
|
|
|
|
|
|
|
def redis_cluster():
|