use of com.vip.saturn.job.integrate.exception.UpdateJobConfigException in project Saturn by vipshop.
the class UpdateJobConfigServiceImpl method batchUpdatePreferList.
@Override
public void batchUpdatePreferList(List<JobConfigInfo> jobConfigInfos) throws UpdateJobConfigException {
if (CollectionUtils.isEmpty(jobConfigInfos)) {
return;
}
List<JobConfig4DB> currentJobConfigs = new ArrayList<JobConfig4DB>();
JobConfig4DB currentJobConfig = null;
for (JobConfigInfo jobConfigInfo : jobConfigInfos) {
currentJobConfig = new JobConfig4DB();
currentJobConfig.setNamespace(jobConfigInfo.getNamespace());
currentJobConfig.setJobName(jobConfigInfo.getJobName());
currentJobConfig.setPreferList(jobConfigInfo.getPerferList());
currentJobConfigs.add(currentJobConfig);
}
try {
currentJobConfigService.batchUpdatePreferList(currentJobConfigs);
} catch (SaturnJobConsoleException e) {
throw new UpdateJobConfigException(e);
}
}
Aggregations