|
@@ -108,7 +108,8 @@ public class TaskService {
|
|
|
@SneakyThrows
|
|
|
public void taskState(String taskId, String state, String podName) {
|
|
|
|
|
|
- redisTemplate.opsForValue().set("podName:" + taskId, podName);
|
|
|
+ String projectId = taskMapper.selectProjectIdById(taskId);
|
|
|
+ redisTemplate.opsForValue().set(manualProjectTopic + ":" + projectId + ":" + taskId + ":pod", podName);
|
|
|
String podDeleteCommand = "kubectl delete pod " + podName;
|
|
|
SshClient client = SshUtil.getClient();
|
|
|
ClientSession session = SshUtil.getSession(client, hostnameScore, usernameScore, passwordScore);
|
|
@@ -122,7 +123,6 @@ public class TaskService {
|
|
|
// taskManager.updateFailStateWithStopTime(taskId, state, TimeUtil.getNowForMysql()); // 如果任务 abort 代表项目失败
|
|
|
redisTemplate.delete("podName:" + taskId);
|
|
|
//result-path-minio: /project/manual-project/
|
|
|
- String projectId = taskMapper.selectProjectIdById(taskId);
|
|
|
String minioPathOfErrorLog = resultPathMinio + projectId + "/" + taskId + "error.log";
|
|
|
boolean objectExist = MinioUtil.isObjectExist(minioClient, bucketName, minioPathOfErrorLog);
|
|
|
String targetEvaluate;
|
|
@@ -170,7 +170,6 @@ public class TaskService {
|
|
|
client.stop();
|
|
|
return;
|
|
|
}
|
|
|
- String projectId = projectPO.getId();
|
|
|
Set<String> keys = redisTemplate.keys("manualProject:" + projectId + "*");
|
|
|
assert keys != null;
|
|
|
redisTemplate.delete(keys);
|