|
@@ -119,7 +119,20 @@ public class TaskService {
|
|
|
//result-path-minio: /project/manual-project/
|
|
|
String projectId = taskMapper.selectProjectIdById(taskId);
|
|
|
String minioPathOfErrorLog = resultPathMinio + projectId + "/" + taskId + "error.log";
|
|
|
+ String errorString = MinioUtil.downloadToString(minioClient, bucketName, minioPathOfErrorLog);
|
|
|
+ String[] lines = errorString.split("\n");
|
|
|
+ AtomicReference<String> errorMessage = new AtomicReference<>("");
|
|
|
+ for (String line : lines) {
|
|
|
+ if (line.startsWith("Original Error")) {
|
|
|
+ errorMessage.set(errorMessage.get() + line + "\n");
|
|
|
+ }
|
|
|
|
|
|
+ if (line.startsWith("Possible Cause")) {
|
|
|
+ errorMessage.set(errorMessage.get() + line);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ String errorMessageString = errorMessage.get();
|
|
|
return;
|
|
|
} else if ("PendingAnalysis".equals(state)) {
|
|
|
LinuxUtil.execute("kubectl delete pod " + podName);
|