Browse Source

竞品更新es 配置

lizongze 1 year ago
parent
commit
4e6edd4c54
3 changed files with 3 additions and 3 deletions
  1. 1 1
      ybw/config/conf.yaml
  2. 1 1
      zbytb/config/conf.yaml
  3. 1 1
      zbytb/utils/databases.py

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