Commit 3c92e69b authored by 赵威's avatar 赵威

update tags

parent 89fb67a8
...@@ -58,7 +58,7 @@ def write_to_es(device_id): ...@@ -58,7 +58,7 @@ def write_to_es(device_id):
first_solutions_d = d.get("first_solutions", {}) first_solutions_d = d.get("first_solutions", {})
second_solutions_d = d.get("second_solutions", {}) second_solutions_d = d.get("second_solutions", {})
projects_d = d.get("projects", {}) projects_d = d.get("projects", {})
anecdote_tags = d.get("anecdote_tags", []) anecdote_tags = d.get("anecdote_tags", {})
body["device_id"] = device_id body["device_id"] = device_id
body["last_modified"] = datetime.datetime.strftime(datetime.datetime.now(pytz.timezone("Asia/Shanghai")), body["last_modified"] = datetime.datetime.strftime(datetime.datetime.now(pytz.timezone("Asia/Shanghai")),
...@@ -70,7 +70,7 @@ def write_to_es(device_id): ...@@ -70,7 +70,7 @@ def write_to_es(device_id):
body["first_solutions"] = _dict_to_name_score(first_solutions_d) body["first_solutions"] = _dict_to_name_score(first_solutions_d)
body["second_solutions"] = _dict_to_name_score(second_solutions_d) body["second_solutions"] = _dict_to_name_score(second_solutions_d)
body["projects"] = _dict_to_name_score(projects_d) body["projects"] = _dict_to_name_score(projects_d)
body["anecdote_tags"] = anecdote_tags body["anecdote_tags"] = _dict_to_name_score(anecdote_tags)
es_insert_device_info(device_id, body) es_insert_device_info(device_id, body)
......
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