Commit 4d4e4fa5 authored by 赵威's avatar 赵威

update read list

parent ac0c5e92
......@@ -26,8 +26,5 @@ if __name__ == "__main__":
print(len(res))
print(res[:10])
res2 = user_portrait_tag3_get_candidate_dict(device_id, "tractate")
print(res2.keys())
total_time = (time.time() - time_begin) / 60
print("total cost {:.2f} mins at {}".format(total_time, datetime.datetime.now()))
......@@ -135,15 +135,14 @@ def user_portrait_tag3_get_candidate_dict(device_id, content_type, latest=False)
def user_portrait_tag3_get_candidate_unread_list(device_id, content_type, size=500):
"""
device_id:
content_type: diary
content_type: diary, tractate
return: []
"""
queue = []
read_list, _ = get_user_portrait_tag3_read_v2(device_id, content_type)
diary_dict = user_portrait_tag3_get_candidate_dict(device_id, "diary")
if diary_dict:
# lol = remove_read_with_size(diary_dict.values(), "diary", read_list, size)
lol = diary_dict.values()
data_dict = user_portrait_tag3_get_candidate_dict(device_id, content_type)
if data_dict:
lol = data_dict.values()
lists = merge_lists(*lol)
queue = get_n_unread_data_from_ids(lists, size, read_list)
return queue
......
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