Commit 7d28c309 by huangfusuper

替换BUG

parent 3f6bdaaa
...@@ -83,7 +83,7 @@ public class ApiNodeServiceImpl implements ApiNodeService { ...@@ -83,7 +83,7 @@ public class ApiNodeServiceImpl implements ApiNodeService {
schedule.setRunParam(PlaceholderUtils.formatParam(schedule.getRunParam())); schedule.setRunParam(PlaceholderUtils.formatParam(schedule.getRunParam()));
String runCommand = schedule.getRunCommand(); String runCommand = schedule.getRunCommand();
if (StringUtils.isNotBlank(runCommand)) { if (StringUtils.isNotBlank(runCommand)) {
runCommand.replace("${"+ PlaceholderEnum.DATE_PLACEHOLDER.getName() +"}", DateUtil.dateLessDayStr(new Date(),"yyyyMMdd",1)); runCommand = runCommand.replace("${"+ PlaceholderEnum.DATE_PLACEHOLDER.getName() +"}", DateUtil.dateLessDayStr(new Date(),"yyyyMMdd",1));
schedule.setRunCommand(runCommand); schedule.setRunCommand(runCommand);
} }
...@@ -106,6 +106,13 @@ public class ApiNodeServiceImpl implements ApiNodeService { ...@@ -106,6 +106,13 @@ public class ApiNodeServiceImpl implements ApiNodeService {
return runKey; return runKey;
} }
public static void main(String[] args) {
String jat = "java -jar -Djava.security.egd=file:/dev/./urandom /ddmp/sqlEngine/ddmp-engine.jar {isReRun:false,jobId:5446,type:\"sql\",engineId:425,exterPath:\"/ddmp/sqlEngine\",storeType:\"redis\",contentKey:\"JOBCONTENT.5446.e8jC5STc\",tenant:0000,bizDate:\"${biz_date}\"}";
jat = jat.replace("${"+ PlaceholderEnum.DATE_PLACEHOLDER.getName() +"}", DateUtil.dateLessDayStr(new Date(),"yyyyMMdd",1));
System.out.println(jat);
}
@Override @Override
public List<JobTaskRunLog> runHistory(String nodeId) { public List<JobTaskRunLog> runHistory(String nodeId) {
ValidationUtil.dataNotBank(nodeId, "nodeId不允许为空!"); ValidationUtil.dataNotBank(nodeId, "nodeId不允许为空!");
......
...@@ -59,7 +59,7 @@ public class ScheduleThreadRunHelper extends BaseThreadRunHelper { ...@@ -59,7 +59,7 @@ public class ScheduleThreadRunHelper extends BaseThreadRunHelper {
} }
String command = mythJobTaskSchedule.getRunCommand(); String command = mythJobTaskSchedule.getRunCommand();
assert command != null; assert command != null;
command.replace("${"+ PlaceholderEnum.DATE_PLACEHOLDER.getName()+"}", DateUtil.dateLessDayStr(new Date(),"yyyyMMdd",1)); command = command.replace("${"+ PlaceholderEnum.DATE_PLACEHOLDER.getName()+"}", DateUtil.dateLessDayStr(new Date(),"yyyyMMdd",1));
mythJobTaskSchedule.setRunCommand(command); mythJobTaskSchedule.setRunCommand(command);
Long triggerTime = mythJobTaskSchedule.getTriggerTime(); Long triggerTime = mythJobTaskSchedule.getTriggerTime();
TimerTask timerTask = null; TimerTask timerTask = null;
......
...@@ -125,8 +125,6 @@ public class ScriptExecutorServiceImpl implements ScriptExecutorService { ...@@ -125,8 +125,6 @@ public class ScriptExecutorServiceImpl implements ScriptExecutorService {
if(scriptParamAndPlaceholderDto != null){ if(scriptParamAndPlaceholderDto != null){
command = PlaceholderUtils.commandReplace(command,scriptParamAndPlaceholderDto.getParam()); command = PlaceholderUtils.commandReplace(command,scriptParamAndPlaceholderDto.getParam());
} }
assert command != null;
command.replace("${"+PlaceholderEnum.DATE_PLACEHOLDER.getName()+"}", DateUtil.dateLessDayStr(new Date(),"yyyyMMdd",1));
List<String> cmdList = Arrays.asList(command.split(" ")); List<String> cmdList = Arrays.asList(command.split(" "));
MythJobProcess mythJobProcess = new MythJobProcess(cmdList, null, null, scriptDto.getLogId(), stringRedisTemplate); MythJobProcess mythJobProcess = new MythJobProcess(cmdList, null, null, scriptDto.getLogId(), stringRedisTemplate);
//保存日志 //保存日志
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment