|
@@ -66,6 +66,7 @@ def get_videos_remain_view_count(video_info_list):
|
|
return
|
|
return
|
|
|
|
|
|
# 每次请求10个
|
|
# 每次请求10个
|
|
|
|
+ bu_fen_fa_cnt = 0
|
|
for i in range(len(video_info_list)//10 + 1):
|
|
for i in range(len(video_info_list)//10 + 1):
|
|
remain_st_time = time.time()
|
|
remain_st_time = time.time()
|
|
videos = [{'videoId': info[0], 'flowPool': info[1]} for info in video_info_list[i*10:(i+1)*10]]
|
|
videos = [{'videoId': info[0], 'flowPool': info[1]} for info in video_info_list[i*10:(i+1)*10]]
|
|
@@ -100,8 +101,8 @@ def get_videos_remain_view_count(video_info_list):
|
|
quick_flow_pool_key = f"{config_.QUICK_FLOWPOOL_KEY_NAME_PREFIX_SET}{config_.APP_TYPE.get(type_name)}" \
|
|
quick_flow_pool_key = f"{config_.QUICK_FLOWPOOL_KEY_NAME_PREFIX_SET}{config_.APP_TYPE.get(type_name)}" \
|
|
f":{config_.QUICK_FLOW_POOL_ID}"
|
|
f":{config_.QUICK_FLOW_POOL_ID}"
|
|
redis_helper.remove_value_from_set(key_name=quick_flow_pool_key, values=(value, ))
|
|
redis_helper.remove_value_from_set(key_name=quick_flow_pool_key, values=(value, ))
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ bu_fen_fa_cnt = bu_fen_fa_cnt + 1
|
|
|
|
+ log_.info(f"新增加不分发过滤前后整体数量: {len(video_info_list)}:{str(bu_fen_fa_cnt)}")
|
|
def get_flow_pool_recommend_config(flow_pool_id):
|
|
def get_flow_pool_recommend_config(flow_pool_id):
|
|
"""获取流量池推荐分发配置"""
|
|
"""获取流量池推荐分发配置"""
|
|
result = request_post(request_url=config_.GET_FLOW_POOL_RECOMMEND_CONFIG_URL)
|
|
result = request_post(request_url=config_.GET_FLOW_POOL_RECOMMEND_CONFIG_URL)
|
|
@@ -325,4 +326,4 @@ if __name__ == '__main__':
|
|
log_.info('flow pool predict end...')
|
|
log_.info('flow pool predict end...')
|
|
log_.info(f"expend time = {(time.time() - st_time) * 1000}ms")
|
|
log_.info(f"expend time = {(time.time() - st_time) * 1000}ms")
|
|
|
|
|
|
-# python flowpool_data_update_with_level.py 测试环境必须手动执行python 才能有数据
|
|
|
|
|
|
+# python flowpool_data_update_with_level.py 测试环境必须手动执行python 才能有数据
|