|
@@ -10,7 +10,7 @@ import config
|
|
|
from log import Log
|
|
|
from config import set_config
|
|
|
from video_recall import PoolRecall
|
|
|
-from video_rank import video_rank, bottom_strategy, video_rank_by_w_h_rate, video_rank_with_old_video
|
|
|
+from video_rank import video_rank, bottom_strategy, video_rank_by_w_h_rate, video_rank_with_old_video, bottom_strategy2
|
|
|
from db_helper import RedisHelper
|
|
|
import gevent
|
|
|
from utils import FilterVideos
|
|
@@ -298,8 +298,13 @@ def video_recommend(request_id, mid, uid, size, top_K, flow_pool_P, app_type, al
|
|
|
# 兜底策略
|
|
|
# log_.info('====== bottom strategy')
|
|
|
start_bottom = time.time()
|
|
|
- rank_result = bottom_strategy(request_id=request_id, size=size, app_type=app_type, ab_code=ab_code, params=params)
|
|
|
- # end_bottom = time.time()
|
|
|
+ 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, ab_code=ab_code, 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,
|