|
@@ -11,6 +11,7 @@ import com.winhc.dataworks.flow.touch.service.TouchService;
|
|
import lombok.SneakyThrows;
|
|
import lombok.SneakyThrows;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
@@ -74,6 +75,7 @@ public class Main {
|
|
int failedNode = 0;
|
|
int failedNode = 0;
|
|
|
|
|
|
boolean flag = true;
|
|
boolean flag = true;
|
|
|
|
+ List<String> empty = new ArrayList<>();
|
|
|
|
|
|
for (TaskInfo taskInfo : collect) {
|
|
for (TaskInfo taskInfo : collect) {
|
|
Map<String, TaskFlowEnum> query = touchService.query(taskInfo.getProject(), taskInfo.getDagId());
|
|
Map<String, TaskFlowEnum> query = touchService.query(taskInfo.getProject(), taskInfo.getDagId());
|
|
@@ -87,9 +89,10 @@ public class Main {
|
|
}
|
|
}
|
|
return entry;
|
|
return entry;
|
|
}).collect(Collectors.groupingBy(Entry::getKey, Collectors.mapping(Entry::getValue, Collectors.toList())));
|
|
}).collect(Collectors.groupingBy(Entry::getKey, Collectors.mapping(Entry::getValue, Collectors.toList())));
|
|
- List<String> success = status.get(TaskFlowEnum.SUCCESS.getMsg());
|
|
|
|
- List<String> failure = status.get(TaskFlowEnum.FAILURE.getMsg());
|
|
|
|
- List<String> await = status.get("运行中");
|
|
|
|
|
|
+ List<String> success = status.getOrDefault(TaskFlowEnum.SUCCESS.getMsg(), empty);
|
|
|
|
+ List<String> failure = status.getOrDefault(TaskFlowEnum.FAILURE.getMsg(), empty);
|
|
|
|
+ List<String> await = status.getOrDefault("运行中", empty);
|
|
|
|
+
|
|
|
|
|
|
if (await.size() != 0) {
|
|
if (await.size() != 0) {
|
|
awaitTask++;
|
|
awaitTask++;
|