Skip to content

Commit

Permalink
任务运行模式属性改为只读;
Browse files Browse the repository at this point in the history
  • Loading branch information
xueli.xue committed May 8, 2017
1 parent 3357529 commit ff5a5bc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,6 @@ public ReturnT<String> reschedule(XxlJobInfo jobInfo) {
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
if (StringUtils.isNotBlank(jobInfo.getChildJobKey())) {
String[] childJobKeys = jobInfo.getChildJobKey().split(",");
Expand Down Expand Up @@ -187,13 +180,14 @@ public ReturnT<String> reschedule(XxlJobInfo jobInfo) {
exists_jobInfo.setExecutorRouteStrategy(jobInfo.getExecutorRouteStrategy());
exists_jobInfo.setExecutorHandler(jobInfo.getExecutorHandler());
exists_jobInfo.setExecutorParam(jobInfo.getExecutorParam());
exists_jobInfo.setGlueType(jobInfo.getGlueType());
exists_jobInfo.setChildJobKey(jobInfo.getChildJobKey());
xxlJobInfoDao.update(exists_jobInfo);

// fresh quartz
String qz_group = String.valueOf(exists_jobInfo.getJobGroup());
String qz_name = String.valueOf(exists_jobInfo.getId());
try {
// fresh quartz
boolean ret = XxlJobDynamicScheduler.rescheduleJob(String.valueOf(exists_jobInfo.getJobGroup()), String.valueOf(exists_jobInfo.getId()), exists_jobInfo.getJobCron());
boolean ret = XxlJobDynamicScheduler.rescheduleJob(qz_group, qz_name, exists_jobInfo.getJobCron());
return ret?ReturnT.SUCCESS:ReturnT.FAIL;
} catch (SchedulerException e) {
logger.error("", e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ logging.info("脚本文件:" + sys.argv[0])
<div class="form-group">
<label for="firstname" class="col-sm-2 control-label">运行模式<font color="red">*</font></label>
<div class="col-sm-4">
<select class="form-control glueType" name="glueType" >
<select class="form-control glueType" name="glueType" disabled >
<#list GlueTypeEnum as item>
<option value="${item}" >${item.desc}</option>
</#list>
Expand Down

0 comments on commit ff5a5bc

Please sign in to comment.