|
@@ -113,9 +113,9 @@ def send_error_info(table_name: str, latest_started_time: str, webhook: str):
|
|
|
|
|
|
def _main():
|
|
|
# 读取配置文件
|
|
|
- # config = configparser.ConfigParser()
|
|
|
- # config.read("/home/monitor/model_monitor/config/config.ini")
|
|
|
- # webhook_url = config.get("feishu", "model.webhook")
|
|
|
+ config = configparser.ConfigParser()
|
|
|
+ config.read("/home/monitor/model_monitor/config/config.ini")
|
|
|
+ webhook_url = config.get("feishu", "model.webhook")
|
|
|
|
|
|
# 获取最近七小时的Spark任务
|
|
|
hours_7_early = int((datetime.now() - timedelta(hours=7)).timestamp()) * 1000
|
|
@@ -140,7 +140,7 @@ def _main():
|
|
|
b, latest_started_time = handle_table(table_name, result)
|
|
|
if b:
|
|
|
print(f"表: {table_name}, 最后一次同步时间距当前时间超过140分钟")
|
|
|
- # send_error_info(table_name, latest_started_time, webhook_url)
|
|
|
+ send_error_info(table_name, latest_started_time, webhook_url)
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|