lizongze 1 жил өмнө
parent
commit
4e6edd4c54

+ 1 - 1
ybw/config/conf.yaml

@@ -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

+ 1 - 1
zbytb/config/conf.yaml

@@ -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

+ 1 - 1
zbytb/utils/databases.py

@@ -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):