Kaynağa Gözat

Merge branch 'master' of http://139.224.213.4:3000/bigdata/DataWorks-flow-touch

晏永年 4 yıl önce
ebeveyn
işleme
76fcfb9617

+ 10 - 0
jobs/task-step01.yaml

@@ -96,3 +96,13 @@ job:
             source: winhc_eci.inc_ods_company_zxr_restrict_pre
             target: winhc_eci_dev.inc_ods_company_zxr_restrict
             flag: 0
+
+  - project: winhc_eci
+    flow: inc_company_cid_change
+    task:
+
+      #run-1 cid变化
+      - taskName: inc_company_cid_change
+        param:
+          - _nodeId: 700003878359
+            project: winhc_eci_dev

+ 14 - 5
src/main/java/com/winhc/dataworks/flow/touch/Main.java

@@ -15,6 +15,7 @@ import com.winhc.dataworks.flow.touch.service.SendJobStatus;
 import com.winhc.dataworks.flow.touch.service.TouchService;
 import com.winhc.dataworks.flow.touch.utils.DateUtils;
 import com.winhc.dataworks.flow.touch.utils.DingUtils;
+import com.winhc.dataworks.flow.touch.utils.SmsUtils;
 import com.winhc.dataworks.flow.touch.utils.SparkDaemonThread;
 import lombok.SneakyThrows;
 import lombok.extern.slf4j.Slf4j;
@@ -41,6 +42,14 @@ public class Main {
     private DataWorksAccessProperties dataWorksAccessProperties;
 
     private static final Options options = new Options();
+    @Autowired
+    private SmsUtils smsUtils;
+
+    private static final String[] to = new String[]{
+            "18538736690"
+            , "17602140784"
+
+    };
 
 
     @Autowired
@@ -141,11 +150,11 @@ public class Main {
                 } else {
                     String odpsCmdPath = commandLine.getOptionValue("odps");
                     dd.send(msg);
-                    Long time = 90l;
+                    Long time = 120L;
                     if (fileName.endsWith("step06.yaml")) {
-                        time = 60 * 6l;
+                        time = 60 * 6L;
                     }
-                    bean.start(bizDate, jobs, odpsCmdPath, time);
+                    bean.start(bizDate, jobs, odpsCmdPath, time, fileName);
                     // 指定job结束后发送通知
                     if (fileName.endsWith("step03.yaml")) {
                         SendJobStatus sendJobStatus = context.getBean(SendJobStatus.class);
@@ -153,7 +162,6 @@ public class Main {
                     }
                 }
             }
-            System.exit(0);
         } catch (ParseException e) {
             HelpFormatter formatter = new HelpFormatter();
             formatter.printHelp("很棒,参数错误", options);
@@ -169,7 +177,7 @@ public class Main {
     }
 
     @SneakyThrows
-    private void start(String bizDate, List<DataWorksFlowJob> jobs, String odpsCmdHome, Long time) {
+    private void start(String bizDate, List<DataWorksFlowJob> jobs, String odpsCmdHome, Long time, String step) {
         //为所有项目空间启动守护线程
         String accessKeyId = dataWorksAccessProperties.getAccessKeyId();
         String accessKeySecret = dataWorksAccessProperties.getAccessKeySecret();
@@ -209,6 +217,7 @@ public class Main {
             failureTask = run(bizDate, js);
         }
         if (!failureTask.isEmpty()) {
+            smsUtils.send("存在任务重启三次未成功,调度程序已退出。请排查并手动重启调度!【" + step + "】", to);
             System.exit(-1);
         }
     }

+ 0 - 1
src/main/java/com/winhc/dataworks/flow/touch/QueryStatus.java

@@ -76,7 +76,6 @@ public class QueryStatus {
         String msg = "上游数据同步任务已经完成!累计阻塞" + between + "分钟";
         dingUtils.send(msg);
         log.info(msg);
-        System.exit(0);
     }
 
 }