|
@@ -18,7 +18,7 @@ class PoolRecall(object):
|
|
|
"""
|
|
|
初始化
|
|
|
:param app_type: 产品标识 type-int
|
|
|
- :param client_info: 用户位置信息 {"country": "国家", "province": "省份", "city": "城市"}
|
|
|
+ :param client_info: 用户位置信息 {"cityCode": 100000}
|
|
|
:param mid: mid type-string
|
|
|
:param uid: uid type-string
|
|
|
:param ab_code: ab_code type-int
|
|
@@ -381,20 +381,20 @@ class PoolRecall(object):
|
|
|
# 获取生效中的置顶视频列表
|
|
|
redis_helper = RedisHelper()
|
|
|
data = redis_helper.get_data_from_redis(key_name=config_.TOP_VIDEO_LIST_KEY_NAME)
|
|
|
- log_.info('===1=== {}'.format(data))
|
|
|
+ # log_.info('===1=== {}'.format(data))
|
|
|
if data is None:
|
|
|
return [], []
|
|
|
# 获取视频id,并转换类型为int,将videoId和score做mapping,并存储为key-value{videoId: score}
|
|
|
video_ids = []
|
|
|
video_info = {}
|
|
|
for item in eval(data):
|
|
|
- log_.info('=== item === {}'.format(item))
|
|
|
+ # log_.info('=== item === {}'.format(item))
|
|
|
video_id = int(item['videoId'])
|
|
|
# 判断 视频推荐区域与用户地址信息 是否匹配,市级别
|
|
|
city_code_list = item['cityCode'].split(',')
|
|
|
if self.client_info.get('cityCode') in city_code_list or config_.ALL_AREA_CODE in city_code_list:
|
|
|
- log_.info('===2=== {}, ===3=== video_id: {}, cityCode: {}'.format(
|
|
|
- self.client_info.get('cityCode'), video_id, city_code_list))
|
|
|
+ # log_.info('===2=== {}, ===3=== video_id: {}, cityCode: {}'.format(
|
|
|
+ # self.client_info.get('cityCode'), video_id, city_code_list))
|
|
|
video_ids.append(video_id)
|
|
|
video_info[video_id] = {'score': item['score'], 'cityCode': city_code_list}
|
|
|
|