Explorar o código

feat:添加分析任务

zhaohaipeng hai 1 ano
pai
achega
7080da6ba1
Modificáronse 1 ficheiros con 5 adicións e 5 borrados
  1. 5 5
      feature_spark_monitor.py

+ 5 - 5
feature_spark_monitor.py

@@ -64,11 +64,11 @@ def handle_table(table_name: str, spark_task_list: List[Dict]) -> (bool, str):
         time_difference = now - latest_started_time
         if time_difference > timedelta(minutes=140):
             return True, latest_started_time
-
-        return False, filtered_data
-
-    # 如果没有找到,表示近七个小时都没有同步过
-    return True, "七小时之前"
+        else:
+            return False, filtered_data
+    else:
+        # 如果没有找到,表示近七个小时都没有同步过
+        return True, "七小时之前"
 
 
 def send_error_info(table_name: str, latest_started_time: str, webhook: str):