任务运行模式属性改为只读;

v1.7
xueli.xue 8 years ago
parent 3357529dd0
commit ff5a5bcd4a

@ -151,13 +151,6 @@ public class XxlJobServiceImpl implements IXxlJobService {
return new ReturnT<String>(500, "路由策略非法"); return new ReturnT<String>(500, "路由策略非法");
} }
if (GlueTypeEnum.match(jobInfo.getGlueType()) == null) {
return new ReturnT<String>(500, "运行模式非法非法");
}
if (GlueTypeEnum.BEAN==GlueTypeEnum.match(jobInfo.getGlueType()) && StringUtils.isBlank(jobInfo.getExecutorHandler())) {
return new ReturnT<String>(500, "请输入“JobHandler”");
}
// childJobKey valid // childJobKey valid
if (StringUtils.isNotBlank(jobInfo.getChildJobKey())) { if (StringUtils.isNotBlank(jobInfo.getChildJobKey())) {
String[] childJobKeys = jobInfo.getChildJobKey().split(","); String[] childJobKeys = jobInfo.getChildJobKey().split(",");
@ -187,13 +180,14 @@ public class XxlJobServiceImpl implements IXxlJobService {
exists_jobInfo.setExecutorRouteStrategy(jobInfo.getExecutorRouteStrategy()); exists_jobInfo.setExecutorRouteStrategy(jobInfo.getExecutorRouteStrategy());
exists_jobInfo.setExecutorHandler(jobInfo.getExecutorHandler()); exists_jobInfo.setExecutorHandler(jobInfo.getExecutorHandler());
exists_jobInfo.setExecutorParam(jobInfo.getExecutorParam()); exists_jobInfo.setExecutorParam(jobInfo.getExecutorParam());
exists_jobInfo.setGlueType(jobInfo.getGlueType());
exists_jobInfo.setChildJobKey(jobInfo.getChildJobKey()); exists_jobInfo.setChildJobKey(jobInfo.getChildJobKey());
xxlJobInfoDao.update(exists_jobInfo); xxlJobInfoDao.update(exists_jobInfo);
// fresh quartz
String qz_group = String.valueOf(exists_jobInfo.getJobGroup());
String qz_name = String.valueOf(exists_jobInfo.getId());
try { try {
// fresh quartz boolean ret = XxlJobDynamicScheduler.rescheduleJob(qz_group, qz_name, exists_jobInfo.getJobCron());
boolean ret = XxlJobDynamicScheduler.rescheduleJob(String.valueOf(exists_jobInfo.getJobGroup()), String.valueOf(exists_jobInfo.getId()), exists_jobInfo.getJobCron());
return ret?ReturnT.SUCCESS:ReturnT.FAIL; return ret?ReturnT.SUCCESS:ReturnT.FAIL;
} catch (SchedulerException e) { } catch (SchedulerException e) {
logger.error("", e); logger.error("", e);

@ -264,7 +264,7 @@ logging.info("脚本文件:" + sys.argv[0])
<div class="form-group"> <div class="form-group">
<label for="firstname" class="col-sm-2 control-label"><font color="red">*</font></label> <label for="firstname" class="col-sm-2 control-label"><font color="red">*</font></label>
<div class="col-sm-4"> <div class="col-sm-4">
<select class="form-control glueType" name="glueType" > <select class="form-control glueType" name="glueType" disabled >
<#list GlueTypeEnum as item> <#list GlueTypeEnum as item>
<option value="${item}" >${item.desc}</option> <option value="${item}" >${item.desc}</option>
</#list> </#list>

Loading…
Cancel
Save