Commit f8d4c14d authored by litaolemo's avatar litaolemo

update

parent 30e0ceb4
......@@ -78,7 +78,9 @@ sql = """
select card_id from strategy_content_exposure_index where card_content_type="user_post" and preciseexposure_num>=50 and ctr>=0.05 and avg_page_stay>=20 and create_day="2020-09-17"
"""
second_demands_count_dict, tags_v3_count_dict, second_demands_card_id_list,tags_v3_card_id_list = get_user_post_from_mysql(sql)
# print(card_id_list)
print(second_demands_count_dict,tags_v3_count_dict,second_demands_card_id_list,tags_v3_card_id_list)
time.sleep(20)
t = 2
day_num = 0 - t
now = (datetime.datetime.now() + datetime.timedelta(days=day_num))
......@@ -197,7 +199,7 @@ for redis_count, device_id in enumerate(device_id_dict):
continue
if res.get("second_demands"):
second_demands = res.get("second_demands")
# print(count_res)
print(second_demands)
for tag in second_demands:
if tag in second_demands_tag_count:
second_demands_tag_count[tag] += 1
......@@ -208,7 +210,7 @@ for redis_count, device_id in enumerate(device_id_dict):
second_demands_tag_dict[device_id] = second_demands
if res.get("projects"):
projects = res.get("projects")
# print(count_res)
print(projects)
for tag in projects:
if tag in projects_demands_tag_count:
projects_demands_tag_count[tag] += 1
......
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