Commit f768ab19 authored by 赵威's avatar 赵威

Merge branch 'offic' into 'master'

update increment dict for the first time

See merge request !47
parents bead0bcb 0affd3c9
......@@ -67,8 +67,7 @@ def update_tag3_user_portrait(cl_id):
"second_solutions": second_solutions_score,
"first_positions": first_positions_score,
"second_positions": second_positions_score,
"projects": projects_score,
"need_update_data": 0
"projects": projects_score
}
key = "doris:user_portrait:tag3:device_id:" + str(cl_id)
......@@ -76,6 +75,11 @@ def update_tag3_user_portrait(cl_id):
redis_client.set(key, json.dumps(res))
redis_client.expire(key, 60 * 60 * 24 * 30)
# only need the first time
key2 = "doris:user_portrait:tag3:increment_update:device_id:" + str(cl_id)
redis_client.set(key2, json.dumps(res))
redis_client.expire(key2, 60 * 60 * 24 * 30)
write_user_portrait(cl_id, ",".join(first_solutions_score.keys()), ",".join(second_solutions_score.keys()),
",".join(first_demands_score.keys()), ",".join(second_demands_score.keys()),
",".join(first_positions_score.keys()), ",".join(second_positions_score.keys()),
......
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