Compare commits

..

No commits in common. "97846ba73d5238321e99a81f0ab90239a5594ac8" and "20d93b98a51e3e3b6335e9fce13e969d0bc049db" have entirely different histories.

1 changed files with 2 additions and 6 deletions

View File

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