|
@@ -15,6 +15,8 @@ import numpy as np
|
|
|
from log import Log
|
|
|
import os
|
|
|
from argparse import ArgumentParser
|
|
|
+from constants import AutoReplyAccountType
|
|
|
+from alg_growth_common import check_unsafe_video, filter_unsafe_video
|
|
|
|
|
|
CONFIG, _ = set_config()
|
|
|
LOGGER = Log()
|
|
@@ -202,6 +204,7 @@ def rank_for_base(run_dt, run_hour, project, stats_table, rank_table, stg_key):
|
|
|
|
|
|
|
|
|
def check_result_data(df):
|
|
|
+ check_unsafe_video(df, False)
|
|
|
for gh_id in GH_IDS + ('default',):
|
|
|
for key in (EXPLORE1_GROUP_NAME, EXPLORE2_GROUP_NAME, BASE_GROUP_NAME):
|
|
|
sub_df = df.query(f'gh_id == "{gh_id}" and strategy_key == "{key}"')
|
|
@@ -233,7 +236,7 @@ def rank_for_base_designate(run_dt, run_hour, stg_key):
|
|
|
],
|
|
|
'15146364945': [
|
|
|
(12794884, 0.6, 1),
|
|
|
- (28623786, 0.5, 2)
|
|
|
+ (13437896, 0.5, 2)
|
|
|
],
|
|
|
'lky': [
|
|
|
(33332362, 0.6, 1),
|
|
@@ -241,7 +244,7 @@ def rank_for_base_designate(run_dt, run_hour, stg_key):
|
|
|
],
|
|
|
'19270839710': [
|
|
|
(12794884, 0.6, 1),
|
|
|
- (28623786, 0.5, 2)
|
|
|
+ (13437896, 0.5, 2)
|
|
|
],
|
|
|
'ManShiGuang': [
|
|
|
(30795410, 0.6, 1),
|
|
@@ -354,11 +357,11 @@ def main_loop():
|
|
|
return
|
|
|
except Exception as e:
|
|
|
LOGGER.error(f"数据更新失败, exception: {e}, traceback: {traceback.format_exc()}")
|
|
|
- if CONFIG.ENV_TEXT == '开发环境':
|
|
|
+ if CONFIG.ENV_TEXT == '开发环境' or args.dry_run:
|
|
|
return
|
|
|
send_msg_to_feishu(
|
|
|
- webhook=CONFIG.FEISHU_ROBOT['server_robot'].get('webhook'),
|
|
|
- key_word=CONFIG.FEISHU_ROBOT['server_robot'].get('key_word'),
|
|
|
+ webhook=CONFIG.FEISHU_ROBOT['growth_task_robot'].get('webhook'),
|
|
|
+ key_word=CONFIG.FEISHU_ROBOT['growth_task_robot'].get('key_word'),
|
|
|
msg_text=f"rov-offline{CONFIG.ENV_TEXT} - 数据更新失败\n"
|
|
|
f"exception: {e}\n"
|
|
|
f"traceback: {traceback.format_exc()}"
|