Commit 96d3b288 authored by 赵威's avatar 赵威

update info

parent 8d6bf14e
...@@ -156,10 +156,14 @@ def get_lintags_by_user_id(user_id): ...@@ -156,10 +156,14 @@ def get_lintags_by_user_id(user_id):
device_id = devices[0] device_id = devices[0]
redis_key = linucb_recommend_redis_prefix + str(device_id) redis_key = linucb_recommend_redis_prefix + str(device_id)
print(redis_key) print(redis_key)
tag_data = redis_client.get(redis_key) print(redis_client.info)
tag_list = json.loads(tag_data[:3]) if tag_data else [] try:
print(tag_list) tag_data = redis_client.get(redis_key)
print("=====") tag_list = json.loads(tag_data[:3]) if tag_data else []
print(tag_list)
print("=====")
except Exception as e:
print(e)
return {"lin_tag_list": tag_list} return {"lin_tag_list": tag_list}
return {"lin_tag_list": []} return {"lin_tag_list": []}
except Exception as e: except Exception as e:
......
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