fix
This commit is contained in:
parent
8d99be356a
commit
7d31e9838a
|
@ -168,6 +168,7 @@ public class XxlJobServiceImpl implements IXxlJobService {
|
||||||
|
|
||||||
// stage job info
|
// stage job info
|
||||||
XxlJobInfo exists_jobInfo = xxlJobInfoDao.loadById(jobInfo.getId());
|
XxlJobInfo exists_jobInfo = xxlJobInfoDao.loadById(jobInfo.getId());
|
||||||
|
String old_cron = exists_jobInfo.getJobCron();
|
||||||
if (exists_jobInfo == null) {
|
if (exists_jobInfo == null) {
|
||||||
return new ReturnT<String>(500, "参数异常");
|
return new ReturnT<String>(500, "参数异常");
|
||||||
}
|
}
|
||||||
|
@ -181,19 +182,16 @@ public class XxlJobServiceImpl implements IXxlJobService {
|
||||||
exists_jobInfo.setExecutorParam(jobInfo.getExecutorParam());
|
exists_jobInfo.setExecutorParam(jobInfo.getExecutorParam());
|
||||||
exists_jobInfo.setGlueSwitch(jobInfo.getGlueSwitch());
|
exists_jobInfo.setGlueSwitch(jobInfo.getGlueSwitch());
|
||||||
exists_jobInfo.setChildJobKey(jobInfo.getChildJobKey());
|
exists_jobInfo.setChildJobKey(jobInfo.getChildJobKey());
|
||||||
|
xxlJobInfoDao.update(exists_jobInfo);
|
||||||
try {
|
|
||||||
// fresh quartz
|
try {
|
||||||
boolean ret = XxlJobDynamicScheduler.rescheduleJob(String.valueOf(exists_jobInfo.getJobGroup()), String.valueOf(exists_jobInfo.getId()), exists_jobInfo.getJobCron());
|
// fresh quartz
|
||||||
if (ret) {
|
boolean ret = XxlJobDynamicScheduler.rescheduleJob(String.valueOf(exists_jobInfo.getJobGroup()), String.valueOf(exists_jobInfo.getId()), exists_jobInfo.getJobCron());
|
||||||
xxlJobInfoDao.update(exists_jobInfo);
|
return ret?ReturnT.SUCCESS:ReturnT.FAIL;
|
||||||
return ReturnT.SUCCESS;
|
} catch (SchedulerException e) {
|
||||||
} else {
|
logger.error("", e);
|
||||||
return new ReturnT<String>(500, "更新任务失败");
|
}
|
||||||
}
|
|
||||||
} catch (SchedulerException e) {
|
|
||||||
logger.error("", e);
|
|
||||||
}
|
|
||||||
return ReturnT.FAIL;
|
return ReturnT.FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ $(function() {
|
||||||
dataType : "json",
|
dataType : "json",
|
||||||
success : function(data){
|
success : function(data){
|
||||||
if (data.code == 200) {
|
if (data.code == 200) {
|
||||||
$("#jobId").html('<option value="" >请选择</option>');
|
$("#jobId").html('<option value="0" >请选择</option>');
|
||||||
$.each(data.content, function (n, value) {
|
$.each(data.content, function (n, value) {
|
||||||
$("#jobId").append('<option value="' + value.id + '" >' + value.jobDesc + '</option>');
|
$("#jobId").append('<option value="' + value.id + '" >' + value.jobDesc + '</option>');
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue