|
@@ -36,8 +36,15 @@ def ad_recommend_predict(mid, video_id):
|
|
|
|
|
|
|
|
|
|
mid_video_share_rate = float(group_share_rate) * float(video_share_rate)
|
|
mid_video_share_rate = float(group_share_rate) * float(video_share_rate)
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ threshold_key_name = f"{config_.KEY_NAME_PREFIX_AD_THRESHOLD}{mid_group}"
|
|
|
|
+ threshold = redis_helper.get_data_from_redis(key_name=threshold_key_name)
|
|
|
|
+ if threshold is None:
|
|
|
|
+ threshold = 0
|
|
|
|
+ else:
|
|
|
|
+ threshold = float(threshold)
|
|
|
|
|
|
- threshold = 0.05
|
|
|
|
if mid_video_share_rate > threshold:
|
|
if mid_video_share_rate > threshold:
|
|
ad_predict = 1
|
|
ad_predict = 1
|
|
else:
|
|
else:
|