|
|
|
@@ -47,7 +47,9 @@ public class ExperimentInstanceStatusTask { |
|
|
|
} |
|
|
|
if (!StringUtils.equals(oldStatus,experimentIns.getStatus())){ |
|
|
|
experimentIns.setUpdateTime(new Date()); |
|
|
|
experimentIds.add(experimentIns.getExperimentId()); |
|
|
|
synchronized (experimentIds) { |
|
|
|
experimentIds.add(experimentIns.getExperimentId()); // 线程安全的添加操作 |
|
|
|
} |
|
|
|
updateList.add(experimentIns); |
|
|
|
} |
|
|
|
experimentInsDao.update(experimentIns); |
|
|
|
@@ -81,7 +83,9 @@ public class ExperimentInstanceStatusTask { |
|
|
|
if (updateexperiments.size() > 0) { |
|
|
|
experimentDao.insertOrUpdateBatch(updateexperiments); |
|
|
|
for (int index = 0; index < updateexperiments.size(); index++) { |
|
|
|
experimentIds.remove(index); |
|
|
|
synchronized (experimentIds) { |
|
|
|
experimentIds.remove(index); // 线程安全的添加操作 |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|