zhaohaipeng 1 месяц назад
Родитель
Сommit
10c4f6e1a6
2 измененных файлов с 3 добавлено и 3 удалено
  1. 2 2
      enums/automation_job.py
  2. 1 1
      monitor/automation_provide_job_monitor.py

+ 2 - 2
enums/automation_job.py

@@ -13,8 +13,8 @@ class AutomationJobCronInfo(Enum):
     video_decode_accurate_text_top = ("视频解构精准文本(每日Top)", "video_decode_accurate_text", "top", 9)
     video_decode_accurate_text_top = ("视频解构精准文本(每日Top)", "video_decode_accurate_text", "top", 9)
     keywords_top = ("视频解构关键词(每日Top)", "keywords", "top", 9)
     keywords_top = ("视频解构关键词(每日Top)", "keywords", "top", 9)
 
 
-    def __init__(self, name, crawler_mode, video_source, task_start_hour):
-        self.name = name
+    def __init__(self, task_name, crawler_mode, video_source, task_start_hour):
+        self.task_name = task_name
         self.crawler_mode = crawler_mode
         self.crawler_mode = crawler_mode
         self.video_source = video_source
         self.video_source = video_source
         self.task_start_hour = task_start_hour
         self.task_start_hour = task_start_hour

+ 1 - 1
monitor/automation_provide_job_monitor.py

@@ -90,7 +90,7 @@ def crawler_mode_not_success_warning(start_ts: int, end_ts: int, job_info_list:
     for job_info in job_info_list:
     for job_info in job_info_list:
         crawler_mode = job_info.crawler_mode
         crawler_mode = job_info.crawler_mode
         video_source = job_info.video_source
         video_source = job_info.video_source
-        job_name = job_info.name
+        job_name = job_info.task_name
 
 
         query_sql = f"crawlerMode : {crawler_mode} and videoSource : {video_source} and result : true | select count(1) as cnt from log"
         query_sql = f"crawlerMode : {crawler_mode} and videoSource : {video_source} and result : true | select count(1) as cnt from log"
         resp = client.get_log(project=project, logstore=log_store, from_time=start_ts, to_time=end_ts, query=query_sql)
         resp = client.get_log(project=project, logstore=log_store, from_time=start_ts, to_time=end_ts, query=query_sql)