Browse Source

Merge pull request '合并dev' (#81) from dev into master

dev-lhz
cp3hnu 1 year ago
parent
commit
a5570045e7
2 changed files with 7 additions and 4 deletions
  1. +3
    -0
      react-ui/src/pages/Pipeline/editPipeline/index.jsx
  2. +4
    -4
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/scheduling/ExperimentInstanceStatusTask.java

+ 3
- 0
react-ui/src/pages/Pipeline/editPipeline/index.jsx View File

@@ -370,6 +370,7 @@ const EditPipeline = () => {
fill: '#fff', fill: '#fff',
stroke: '#a4a4a5', stroke: '#a4a4a5',
cursor: 'crosshair', cursor: 'crosshair',
lineWidth: 1,
}, },
name: `anchor-point`, // the name, for searching by group.find(ele => ele.get('name') === 'anchor-point') name: `anchor-point`, // the name, for searching by group.find(ele => ele.get('name') === 'anchor-point')
anchorPointIdx: i, // flag the idx of the anchor-point circle anchorPointIdx: i, // flag the idx of the anchor-point circle
@@ -409,11 +410,13 @@ const EditPipeline = () => {
if (sourceAnchorIdx !== null && sourceAnchorIdx !== undefined) { if (sourceAnchorIdx !== null && sourceAnchorIdx !== undefined) {
const anchorPoint = anchorPoints[sourceAnchorIdx]; const anchorPoint = anchorPoints[sourceAnchorIdx];
anchorPoint.attr('stroke', value ? themes['primaryColor'] : '#a4a4a5'); anchorPoint.attr('stroke', value ? themes['primaryColor'] : '#a4a4a5');
anchorPoint.attr('lineWidth', value ? 2 : 1);
} }
} else if (name === 'drop') { } else if (name === 'drop') {
if (dropAnchorIdx !== null && dropAnchorIdx !== undefined) { if (dropAnchorIdx !== null && dropAnchorIdx !== undefined) {
const anchorPoint = anchorPoints[dropAnchorIdx]; const anchorPoint = anchorPoints[dropAnchorIdx];
anchorPoint.attr('stroke', value ? themes['primaryColor'] : '#a4a4a5'); anchorPoint.attr('stroke', value ? themes['primaryColor'] : '#a4a4a5');
anchorPoint.attr('lineWidth', value ? 2 : 1);
} }
} }
}, },


+ 4
- 4
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/scheduling/ExperimentInstanceStatusTask.java View File

@@ -34,7 +34,7 @@ public class ExperimentInstanceStatusTask {
private ModelDependencyDao modelDependencyDao; private ModelDependencyDao modelDependencyDao;
private List<Integer> experimentIds = new ArrayList<>(); private List<Integer> experimentIds = new ArrayList<>();


@Scheduled(cron = "0/30 * * * * ?") // 每30S执行一次
@Scheduled(cron = "0/14 * * * * ?") // 每30S执行一次
public void executeExperimentInsStatus() throws IOException { public void executeExperimentInsStatus() throws IOException {
// 首先查到所有非终止态的实验实例 // 首先查到所有非终止态的实验实例
List<ExperimentIns> experimentInsList = experimentInsService.queryByExperimentIsNotTerminated(); List<ExperimentIns> experimentInsList = experimentInsService.queryByExperimentIsNotTerminated();
@@ -49,7 +49,7 @@ public class ExperimentInstanceStatusTask {
}catch (Exception e){ }catch (Exception e){
experimentIns.setStatus("Failed"); experimentIns.setStatus("Failed");
} }
if (!StringUtils.equals(oldStatus,experimentIns.getStatus())){
// if (!StringUtils.equals(oldStatus,experimentIns.getStatus())){
experimentIns.setUpdateTime(new Date()); experimentIns.setUpdateTime(new Date());
// 线程安全的添加操作 // 线程安全的添加操作
synchronized (experimentIds) { synchronized (experimentIds) {
@@ -57,7 +57,7 @@ public class ExperimentInstanceStatusTask {
} }
updateList.add(experimentIns); updateList.add(experimentIns);


}
// }
// experimentInsDao.update(experimentIns); // experimentInsDao.update(experimentIns);
} }


@@ -105,7 +105,7 @@ public class ExperimentInstanceStatusTask {
} }


} }
@Scheduled(cron = "0/30 * * * * ?") // / 每30S执行一次
@Scheduled(cron = "0/17 * * * * ?") // / 每30S执行一次
public void executeExperimentStatus() throws IOException { public void executeExperimentStatus() throws IOException {
if (experimentIds.size()==0){ if (experimentIds.size()==0){
return; return;


Loading…
Cancel
Save