|
@@ -384,7 +384,7 @@ def video_old_recommend(request_id, mid, uid, size, top_K, flow_pool_P, app_type
|
|
|
gevent.joinall(t)
|
|
|
recall_result_list = [i.get() for i in t]
|
|
|
|
|
|
- print(recall_result_list)
|
|
|
+ #print(recall_result_list)
|
|
|
if len(recall_result_list)<0:
|
|
|
result['recallResult']= []
|
|
|
result['rankResult'] = []
|
|
@@ -394,7 +394,7 @@ def video_old_recommend(request_id, mid, uid, size, top_K, flow_pool_P, app_type
|
|
|
if len(recall_result_list)>=4:
|
|
|
region_recall = recall_result_list[0]
|
|
|
sim_recall = recall_result_list[3]
|
|
|
- print("sim:",sim_recall)
|
|
|
+ #print("sim:",sim_recall)
|
|
|
now_video_ids = set('')
|
|
|
if len(region_recall)>0:
|
|
|
for video in region_recall:
|
|
@@ -405,7 +405,7 @@ def video_old_recommend(request_id, mid, uid, size, top_K, flow_pool_P, app_type
|
|
|
if len(sim_recall)>0:
|
|
|
for video in sim_recall:
|
|
|
video_id = video.get('videoId')
|
|
|
- print("sim video_id:", video_id)
|
|
|
+ #print("sim video_id:", video_id)
|
|
|
if video_id not in now_video_ids:
|
|
|
rov_pool_recall.append(video)
|
|
|
now_video_ids.add(video_id)
|
|
@@ -1518,6 +1518,8 @@ def video_homepage_recommend(request_id, mid, uid, size, app_type, algo_type,
|
|
|
update_flow_redis_data(result=rank_result, app_type=app_type, mid=mid, top_K=top_K)
|
|
|
elif ab_code == 60050 or ab_code == 60051:
|
|
|
update_redis_data(result=rank_result, app_type=app_type, mid=mid, top_K=top_K)
|
|
|
+ elif ab_code == 60052 or ab_code == 60053 or ab_code == 60054:
|
|
|
+ update_redis_data(result=rank_result, app_type=app_type, mid=mid, top_K=top_K)
|
|
|
else:
|
|
|
update_redis_data(result=rank_result, app_type=app_type, mid=mid, top_K=top_K)
|
|
|
# log_.info({
|
|
@@ -1639,12 +1641,14 @@ def video_relevant_recommend(request_id, video_id, mid, uid, size, app_type, ab_
|
|
|
|
|
|
# redis数据刷新
|
|
|
update_redis_st = time.time()
|
|
|
- # if ab_code == 60047 or ab_code == 60048 or ab_code == 60049:
|
|
|
- # update_flow_redis_data(result=rank_result, app_type=app_type, mid=mid, top_K=top_K)
|
|
|
- # elif ab_code == 60050 or ab_code == 60051:
|
|
|
- # update_redis_data(result=rank_result, app_type=app_type, mid=mid, top_K=top_K)
|
|
|
- # else:
|
|
|
- # update_redis_data(result=rank_result, app_type=app_type, mid=mid, top_K=top_K)
|
|
|
+ if ab_code == 60047 or ab_code == 60048 or ab_code == 60049:
|
|
|
+ update_flow_redis_data(result=rank_result, app_type=app_type, mid=mid, top_K=top_K)
|
|
|
+ elif ab_code == 60050 or ab_code == 60051:
|
|
|
+ update_redis_data(result=rank_result, app_type=app_type, mid=mid, top_K=top_K)
|
|
|
+ elif ab_code == 60052 or ab_code == 60053 or ab_code == 60054:
|
|
|
+ update_redis_data(result=rank_result, app_type=app_type, mid=mid, top_K=top_K)
|
|
|
+ else:
|
|
|
+ update_redis_data(result=rank_result, app_type=app_type, mid=mid, top_K=top_K)
|
|
|
# log_.info({
|
|
|
# 'logTimestamp': int(time.time() * 1000),
|
|
|
# 'request_id': request_id,
|