Commit 56c4cfb2 by huangfusuper

测试一个异常

parent a7e6a60a
...@@ -15,6 +15,7 @@ import com.byit.job.utils.DateUtil; ...@@ -15,6 +15,7 @@ import com.byit.job.utils.DateUtil;
import com.byit.job.utils.PlaceholderUtils; import com.byit.job.utils.PlaceholderUtils;
import com.byit.node.ProcessingNodeChain; import com.byit.node.ProcessingNodeChain;
import com.byit.node.machine.ProcessingMachine; import com.byit.node.machine.ProcessingMachine;
import com.byit.utils.ExecutorLogUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
...@@ -52,6 +53,7 @@ public class CommandAndScriptProcessingMachine implements ProcessingMachine { ...@@ -52,6 +53,7 @@ public class CommandAndScriptProcessingMachine implements ProcessingMachine {
String command = scriptDto.getCommand(); String command = scriptDto.getCommand();
log.debug("-----初始命令为{}------------", command); log.debug("-----初始命令为{}------------", command);
String param = scriptDto.getParam(); String param = scriptDto.getParam();
param = "测试异常";
ScriptParamAndPlaceholderDto paramAndPlaceholderDto = null; ScriptParamAndPlaceholderDto paramAndPlaceholderDto = null;
if (StringUtils.isNotBlank(param)) { if (StringUtils.isNotBlank(param)) {
RunParamWrapped runParamWrapped = JSON.parseObject(param, RunParamWrapped.class); RunParamWrapped runParamWrapped = JSON.parseObject(param, RunParamWrapped.class);
...@@ -67,17 +69,11 @@ public class CommandAndScriptProcessingMachine implements ProcessingMachine { ...@@ -67,17 +69,11 @@ public class CommandAndScriptProcessingMachine implements ProcessingMachine {
scriptDto.setCommand(command); scriptDto.setCommand(command);
scriptDto.setTempDir(scriptDirPath); scriptDto.setTempDir(scriptDirPath);
} }
// if (paramAndPlaceholderDto != null) {
// log.debug("-----命令参数替换完成,命令为:[{}]------------",command);
// scriptDto.setCommand(command);
// }
//将脚本的携带的参数 拼接在命令后方 python test.py -sex 男 -name 张三 -age 14
log.info("---------命令及脚本参数处理完成,此节点处理数据为:[{}]-----------", scriptDto); log.info("---------命令及脚本参数处理完成,此节点处理数据为:[{}]-----------", scriptDto);
processingNodeChain.doProcessing(scriptDto, processingNodeChain); processingNodeChain.doProcessing(scriptDto, processingNodeChain);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); log.error("{}", ExecutorLogUtil.getMessage(e));
throw new ExecutorException(e); throw new ExecutorException(e);
} }
} }
......
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