This commit is contained in:
@@ -141,6 +141,16 @@ public class EMSSchedulerImpl implements EMSScheduler {
|
|||||||
JobDetail existingJob = clusteredScheduler.getJobDetail(jobKey);
|
JobDetail existingJob = clusteredScheduler.getJobDetail(jobKey);
|
||||||
|
|
||||||
if (existing != null && existingJob != null) {
|
if (existing != null && existingJob != null) {
|
||||||
|
// JobDetail(JobData 포함) 갱신
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
Class<Job> jobClass = (Class<Job>) Class.forName(jobInfo.getJobClassName());
|
||||||
|
JobBuilder jobBuilder = newJob(jobClass).withIdentity(jobKey);
|
||||||
|
for (JobData jobData : jobInfo.getJobDatas()) {
|
||||||
|
jobBuilder.usingJobData(jobData.getId().getDataKey(), jobData.getDataValue());
|
||||||
|
}
|
||||||
|
clusteredScheduler.addJob(jobBuilder.build(), true);
|
||||||
|
|
||||||
|
// 트리거(cron) 갱신
|
||||||
CronTrigger newTrigger = newTrigger()
|
CronTrigger newTrigger = newTrigger()
|
||||||
.withIdentity(triggerKey)
|
.withIdentity(triggerKey)
|
||||||
.withSchedule(cronSchedule(jobInfo.getCronExp()))
|
.withSchedule(cronSchedule(jobInfo.getCronExp()))
|
||||||
|
|||||||
Reference in New Issue
Block a user