|
|
|
@@ -63,7 +63,6 @@ public class ExperimentInsServiceImpl implements ExperimentInsService { |
|
|
|
// 检查是否需要调用接口查询状态:当原本状态为null或非终止态时调用argo接口 |
|
|
|
if (StringUtils.isEmpty(currentStatus) || !isTerminatedState(currentStatus)) { |
|
|
|
experimentIns = this.queryStatusFromArgo(experimentIns); |
|
|
|
|
|
|
|
// 如果新状态不是null,并且与旧状态不同,则更新状态 |
|
|
|
if(!StringUtils.isEmpty(experimentIns.getStatus()) && !StringUtils.equals(experimentIns.getStatus(), currentStatus)){ |
|
|
|
this.update(experimentIns); |
|
|
|
@@ -84,6 +83,8 @@ public class ExperimentInsServiceImpl implements ExperimentInsService { |
|
|
|
@Override |
|
|
|
public List<ExperimentIns> getByExperimentId(Integer experimentId) { |
|
|
|
List<ExperimentIns> experimentInsList = experimentInsDao.getByExperimentId(experimentId); |
|
|
|
|
|
|
|
List<ExperimentIns> result = new ArrayList<ExperimentIns>(); |
|
|
|
if (experimentInsList!=null&&experimentInsList.size()>0) { |
|
|
|
for (ExperimentIns experimentIns : experimentInsList) { |
|
|
|
//当原本状态为null或非终止态时才调用argo接口 |
|
|
|
@@ -92,14 +93,14 @@ public class ExperimentInsServiceImpl implements ExperimentInsService { |
|
|
|
//只有当新状态是终止态时才更新数据库 |
|
|
|
if (isTerminatedState(experimentIns.getStatus())) { |
|
|
|
//同时更新各个节点 |
|
|
|
|
|
|
|
this.update(experimentIns); |
|
|
|
} |
|
|
|
} |
|
|
|
result.add(experimentIns); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return experimentInsList; |
|
|
|
return result; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@@ -365,7 +366,9 @@ public class ExperimentInsServiceImpl implements ExperimentInsService { |
|
|
|
Map<String,Object> requestData = new HashMap<>(); |
|
|
|
requestData.put("namespace", namespace); |
|
|
|
requestData.put("name", name); |
|
|
|
|
|
|
|
requestData.put("workflow-type","workflows"); |
|
|
|
requestData.put("artifact-name","workflows"); |
|
|
|
requestData.put("workflow-type","workflows"); |
|
|
|
// 创建发送数据map,将请求数据作为"data"键的值 |
|
|
|
Map<String,Object> res = new HashMap<>(); |
|
|
|
res.put("data", requestData); |
|
|
|
|