Commit 245bb9b4 authored by 段英荣's avatar 段英荣

modify bug

parent b02ddd39
......@@ -113,9 +113,11 @@ def choice_push_tag(device_id, user_id):
now_sec = int(time.time())
valid_time = 8*7*24*60*60
for tag_id in redis_push_tag_dict:
ori_key_list = list(redis_push_tag_dict.keys())
for tag_id in ori_key_list:
if now_sec - redis_push_tag_dict[tag_id] >= valid_time:
redis_push_tag_dict.popitem(tag_id)
redis_push_tag_dict.pop(tag_id)
redis_push_tag_list = list(redis_push_tag_dict.keys())
redis_push_tag_list = [int(item) for item in redis_push_tag_list]
......
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