@@ -8,7 +8,7 @@ mongo:
# redis
redis:
- host: 172.17.4.232
+ host: 172.17.162.28
port: !!int 7361
pwd: "k5ZJR5KV4q7DRZ92DQ"
db: !!int 1
@@ -51,7 +51,7 @@ def object_id(_id: str):
def es_client(cfg=None):
if cfg is None:
cfg = es_conf
- return Elasticsearch([{"host": cfg['host'], "port": cfg['port']}])
+ return Elasticsearch([{"host": cfg['host'], "port": cfg['port']}],http_auth=(cfg['usename'], cfg['pwd']))
def es_query(title: str, publish_time: int):