Commit c231d1e0 authored by 李小芳's avatar 李小芳

Merge branch 'mr/develop/dbmw' into 'master'

Mr/develop/dbmw

See merge request !12
parents f77719bf ec1db7b5
...@@ -189,5 +189,5 @@ def get_es_instance(): ...@@ -189,5 +189,5 @@ def get_es_instance():
'sniff_on_connection_fail': False, 'sniff_on_connection_fail': False,
} }
new_hosts = settings.ES7_HOSTS new_hosts = settings.ES7_HOSTS
__es_instance = Elasticsearch(hosts=new_hosts, http_auth=("elastic", "gengmei!@#"), **init_args) __es_instance = Elasticsearch(hosts=new_hosts, http_auth=(settings.HTTP_AUTH_NAME, settings.HTTP_AUTH_PWD), **init_args)
return __es_instance return __es_instance
...@@ -65,7 +65,7 @@ def get_es(es_hosts_config=None): ...@@ -65,7 +65,7 @@ def get_es(es_hosts_config=None):
'sniff_on_connection_fail': False, 'sniff_on_connection_fail': False,
} }
new_hosts = settings.ES7_HOSTS if not es_hosts_config else es_hosts_config new_hosts = settings.ES7_HOSTS if not es_hosts_config else es_hosts_config
new_es = Es(hosts=new_hosts, http_auth=("elastic", "gengmei!@#"),**init_args) new_es = Es(hosts=new_hosts, http_auth=(settings.HTTP_AUTH_NAME, settings.HTTP_AUTH_PWD), **init_args)
return new_es return new_es
...@@ -75,8 +75,8 @@ def get_service_es(es_hosts_config=None): ...@@ -75,8 +75,8 @@ def get_service_es(es_hosts_config=None):
'sniff_on_connection_fail': False, 'sniff_on_connection_fail': False,
} }
new_hosts = settings.ES7_HOSTS_SERVICE if not es_hosts_config else es_hosts_config new_hosts = settings.ES7_SERVICE_HOSTS if not es_hosts_config else es_hosts_config
new_es = Es(hosts=new_hosts, http_auth=("elastic", "gengmei!@#"), **init_args) new_es = Es(hosts=new_hosts, http_auth=(settings.HTTP_AUTH_NAME, settings.HTTP_AUTH_PWD), **init_args)
return new_es return new_es
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment