Commit 0359e046 authored by litaolemo's avatar litaolemo

update

parent 7f70c018
...@@ -30,9 +30,16 @@ import datetime ...@@ -30,9 +30,16 @@ import datetime
es = Elasticsearch([ es = Elasticsearch([
{ {
'host': '172.16.31.13', 'host': '172.16.31.6',
'port': 9000, 'port': 9200,
}]) }, {
'host': '172.16.31.16',
'port': 9200,
}, {
'host': '172.16.31.10',
'port': 9200,
}
])
def get_all_tag(): def get_all_tag():
...@@ -46,6 +53,7 @@ def get_all_tag(): ...@@ -46,6 +53,7 @@ def get_all_tag():
db.close() db.close()
for res in result: for res in result:
res_dict[res[0]] = 1 res_dict[res[0]] = 1
print(res_dict)
return res_dict return res_dict
...@@ -67,7 +75,7 @@ def from_es_get_service_num(query): ...@@ -67,7 +75,7 @@ def from_es_get_service_num(query):
} }
results = es.search( results = es.search(
index='gm-dbmw-service-write', index='gm-dbmw-service',
doc_type='service', doc_type='service',
timeout='10s', timeout='10s',
size=0, size=0,
......
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