|
@@ -300,36 +300,36 @@ def video_recommend(request_id, mid, uid, size, top_K, flow_pool_P, app_type, al
|
|
|
result['rankResult'] = rank_result
|
|
|
result['rankTime'] = (time.time() - start_rank) * 1000
|
|
|
|
|
|
- if not rank_result:
|
|
|
- # 兜底策略
|
|
|
- # log_.info('====== bottom strategy')
|
|
|
- start_bottom = time.time()
|
|
|
- rank_result = bottom_strategy2(
|
|
|
- size=size, app_type=app_type, mid=mid, uid=uid, ab_code=ab_code, client_info=client_info, params=params
|
|
|
- )
|
|
|
-
|
|
|
- # if ab_code == config_.AB_CODE['region_rank_by_h'].get('abtest_130'):
|
|
|
- # rank_result = bottom_strategy2(
|
|
|
- # size=size, app_type=app_type, mid=mid, uid=uid, ab_code=ab_code, client_info=client_info, params=params
|
|
|
- # )
|
|
|
- # else:
|
|
|
- # rank_result = bottom_strategy(
|
|
|
- # request_id=request_id, size=size, app_type=app_type, ab_code=ab_code, params=params
|
|
|
- # )
|
|
|
-
|
|
|
- # log_.info({
|
|
|
- # 'logTimestamp': int(time.time() * 1000),
|
|
|
- # 'request_id': request_id,
|
|
|
- # 'mid': mid,
|
|
|
- # 'uid': uid,
|
|
|
- # 'operation': 'bottom',
|
|
|
- # 'bottom_result': rank_result,
|
|
|
- # 'executeTime': (time.time() - start_bottom) * 1000
|
|
|
- # })
|
|
|
- result['bottomResult'] = rank_result
|
|
|
- result['bottomTime'] = (time.time() - start_bottom) * 1000
|
|
|
-
|
|
|
- result['rankResult'] = rank_result
|
|
|
+ # if not rank_result:
|
|
|
+ # # 兜底策略
|
|
|
+ # # log_.info('====== bottom strategy')
|
|
|
+ # start_bottom = time.time()
|
|
|
+ # rank_result = bottom_strategy2(
|
|
|
+ # size=size, app_type=app_type, mid=mid, uid=uid, ab_code=ab_code, client_info=client_info, params=params
|
|
|
+ # )
|
|
|
+ #
|
|
|
+ # # if ab_code == config_.AB_CODE['region_rank_by_h'].get('abtest_130'):
|
|
|
+ # # rank_result = bottom_strategy2(
|
|
|
+ # # size=size, app_type=app_type, mid=mid, uid=uid, ab_code=ab_code, client_info=client_info, params=params
|
|
|
+ # # )
|
|
|
+ # # else:
|
|
|
+ # # rank_result = bottom_strategy(
|
|
|
+ # # request_id=request_id, size=size, app_type=app_type, ab_code=ab_code, params=params
|
|
|
+ # # )
|
|
|
+ #
|
|
|
+ # # log_.info({
|
|
|
+ # # 'logTimestamp': int(time.time() * 1000),
|
|
|
+ # # 'request_id': request_id,
|
|
|
+ # # 'mid': mid,
|
|
|
+ # # 'uid': uid,
|
|
|
+ # # 'operation': 'bottom',
|
|
|
+ # # 'bottom_result': rank_result,
|
|
|
+ # # 'executeTime': (time.time() - start_bottom) * 1000
|
|
|
+ # # })
|
|
|
+ # result['bottomResult'] = rank_result
|
|
|
+ # result['bottomTime'] = (time.time() - start_bottom) * 1000
|
|
|
+ #
|
|
|
+ # result['rankResult'] = rank_result
|
|
|
|
|
|
return result
|
|
|
# return rank_result, last_rov_recall_key
|