|
@@ -75,6 +75,8 @@ public class ProjectConsumer {
|
|
|
@Resource
|
|
|
IndexMapper indexMapper;
|
|
|
@Resource
|
|
|
+ TaskMapper taskMapper;
|
|
|
+ @Resource
|
|
|
TaskManager taskManager;
|
|
|
@Resource
|
|
|
ProjectManager projectManager;
|
|
@@ -109,6 +111,10 @@ public class ProjectConsumer {
|
|
|
}
|
|
|
String projectPath = linuxTempPath + "project/" + projectId + "/";
|
|
|
FileUtil.mkdir(projectPath);
|
|
|
+ //5 将该 project 下所有旧的指标得分删除。
|
|
|
+ taskMapper.deleteByProject(projectId);
|
|
|
+ indexMapper.deleteFirstTargetScoreByProjectId(projectId);
|
|
|
+ indexMapper.deleteLastTargetScoreByProjectId(projectId);
|
|
|
// -------------------------------- 1 查询场景 --------------------------------
|
|
|
//根据场景测试包 packageId,拿到场景集合(不包括重复场景),重复场景会在发送消息时根据叶子指标发送多次。
|
|
|
List<ScenePO> scenePOList = projectService.getSceneList(projectId, packageId, projectPath);
|
|
@@ -355,7 +361,8 @@ public class ProjectConsumer {
|
|
|
* @param projectRunningKey projectRunningKey
|
|
|
*/
|
|
|
@SneakyThrows
|
|
|
- public void parseProject(ProjectMessageDTO projectMessageDTO, String projectWaitingKey, String projectRunningKey, String userId) {
|
|
|
+ public void parseProject(ProjectMessageDTO projectMessageDTO, String projectWaitingKey, String projectRunningKey,
|
|
|
+ String userId) {
|
|
|
String projectId = projectMessageDTO.getProjectId(); // 项目 id
|
|
|
String projectType = projectMessageDTO.getType(); // 项目类型
|
|
|
int currentParallelism = projectMessageDTO.getCurrentParallelism(); // 当前并行度
|
|
@@ -365,7 +372,7 @@ public class ProjectConsumer {
|
|
|
String algorithmId = projectMessageDTO.getAlgorithmId(); // 算法 id
|
|
|
String projectPath = linuxTempPath + "project/" + projectId + "/";
|
|
|
// -------------------------------- 0 准备 --------------------------------
|
|
|
- projectService.prepare(projectMessageDTO, projectWaitingKey, projectRunningKey);
|
|
|
+// projectService.prepare(projectMessageDTO, projectWaitingKey, projectRunningKey);
|
|
|
// -------------------------------- 1 获取任务 json 列表 --------------------------------
|
|
|
List<String> taskJsonList = FileUtil.listAbsolutePathByType(projectPath, "json");
|
|
|
int taskTotal = taskJsonList.size();
|