Commit 66286a09 authored by 高雅喆's avatar 高雅喆

工厂模式,查询用户lin信息增加灰度,删除掉无用接口

parent b36986a0
......@@ -884,7 +884,7 @@ def get_edit_tag_name(tag_lst):
@bind("physical/search/device_linucb_tag_debug")
def get_device_linucb_tag2(device_id=None, size=20, has_score=False):
def get_device_linucb_tag2(device_id=None, size=20, has_score=False, gray_list=[]):
# {
# "lincub": [{"id": 1, "name": 名字}, {"id": 2, "name": 名字}, {"id": 3, "name": 名字}, {"id": 5, "name": 名字},
# {"id": 6, "name": 名字}, ]
......@@ -892,6 +892,9 @@ def get_device_linucb_tag2(device_id=None, size=20, has_score=False):
try:
user_feature = [1, 1]
if device_id:
if STRATEGY_TYPE.CTR_GRAY in gray_list:
linucb_matrix_redis_prefix = "ctr_physical:linucb:device_id:"
else:
linucb_matrix_redis_prefix = "physical:linucb:device_id:"
redis_key = linucb_matrix_redis_prefix + str(device_id)
redis_linucb_tag_data_dict = redis_client.hgetall(redis_key)
......
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