|
@@ -12,7 +12,7 @@ from applications.const import updateAccountReadRateTaskConst
|
|
|
|
|
|
const = updateAccountReadRateTaskConst()
|
|
|
functions = Functions()
|
|
|
-read_rate_table = "long_articles_read_rate_dev"
|
|
|
+read_rate_table = "long_articles_read_rate"
|
|
|
|
|
|
|
|
|
def filter_outlier_data(group, key='show_view_count'):
|
|
@@ -287,29 +287,27 @@ def update_single_day(dt, account_list, article_df, lam):
|
|
|
insert_error_list.append(e)
|
|
|
|
|
|
if insert_error_list:
|
|
|
- # bot(
|
|
|
- # title="更新阅读率均值,存在sql 插入失败",
|
|
|
- # detail=insert_error_list
|
|
|
- # )
|
|
|
- print(insert_error_list)
|
|
|
+ bot(
|
|
|
+ title="更新阅读率均值,存在sql 插入失败",
|
|
|
+ detail=insert_error_list
|
|
|
+ )
|
|
|
|
|
|
if error_list:
|
|
|
- # bot(
|
|
|
- # title="更新阅读率均值,头次出现异常值通知",
|
|
|
- # detail={
|
|
|
- # "时间": dt,
|
|
|
- # "异常列表": error_list
|
|
|
- # }
|
|
|
- # )
|
|
|
- print(error_list)
|
|
|
-
|
|
|
- # if not error_list and not insert_error_list:
|
|
|
- # bot(
|
|
|
- # title="阅读率均值表,更新成功",
|
|
|
- # detail={
|
|
|
- # "日期": dt
|
|
|
- # }
|
|
|
- # )
|
|
|
+ bot(
|
|
|
+ title="更新阅读率均值,头次出现异常值通知",
|
|
|
+ detail={
|
|
|
+ "时间": dt,
|
|
|
+ "异常列表": error_list
|
|
|
+ }
|
|
|
+ )
|
|
|
+
|
|
|
+ if not error_list and not insert_error_list:
|
|
|
+ bot(
|
|
|
+ title="阅读率均值表,更新成功",
|
|
|
+ detail={
|
|
|
+ "日期": dt
|
|
|
+ }
|
|
|
+ )
|
|
|
|
|
|
|
|
|
def main() -> None:
|