Commit 1ca4bf02 authored by litaolemo's avatar litaolemo

update

parent 6ac9d441
...@@ -133,6 +133,7 @@ time.sleep(10) ...@@ -133,6 +133,7 @@ time.sleep(10)
second_demands_tag_count = {} second_demands_tag_count = {}
projects_demands_tag_count = {} projects_demands_tag_count = {}
total_tag_count = {}
for redis_count,spark_res in enumerate(sql_res): for redis_count,spark_res in enumerate(sql_res):
# if redis_count >= 50:break # if redis_count >= 50:break
second_demands = [] second_demands = []
...@@ -172,6 +173,18 @@ for redis_count,spark_res in enumerate(sql_res): ...@@ -172,6 +173,18 @@ for redis_count,spark_res in enumerate(sql_res):
if 0 <= total_tractate_content_num < 10: if 0 <= total_tractate_content_num < 10:
bulk_dict[0][1] += 1 bulk_dict[0][1] += 1
if second_demands:
for tag in second_demands:
if tag in second_demands_tag_count:
total_tag_count[tag] += 1
else:
total_tag_count[tag] = 1
if projects:
for tag in projects:
if tag in projects_demands_tag_count:
total_tag_count[tag] += 1
else:
total_tag_count[tag] = 1
elif 10 <= total_tractate_content_num < 50: elif 10 <= total_tractate_content_num < 50:
bulk_dict[10][1] += 1 bulk_dict[10][1] += 1
elif 50 <= total_tractate_content_num < 100: elif 50 <= total_tractate_content_num < 100:
......
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