Commit 2917851d by huangfusuper

Merge remote-tracking branch 'origin/developer' into developer

parents c8c0e154 e18c171a
......@@ -56,6 +56,18 @@
<artifactId>jedis</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j-api.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j-api.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
......
......@@ -5,6 +5,7 @@ import com.byit.dto.executor.DispatchResponseDto;
import com.byit.dto.executor.JobRunResultDto;
import com.byit.dto.executor.ScriptDto;
import com.byit.dto.executor.ScriptParamAndPlaceholderDto;
import com.byit.enums.PlaceholderEnum;
import com.byit.executor.api.ScriptExecutorService;
import com.byit.process.MythJobProcess;
import com.byit.process.ProcessFailureException;
......@@ -95,11 +96,12 @@ public class ScriptExecutorServiceImpl implements ScriptExecutorService {
if(null != param){
scriptParamAndPlaceholderDto = JSON.parseObject(param, ScriptParamAndPlaceholderDto.class);
}
String scriptPath = byteArrayToFile(remotePath,scriptParamAndPlaceholderDto);
log.info("-------------脚本所在路径为:{}-------------",scriptPath);
//初始化命令信息
command = PlaceholderUtils.initCommand(command,scriptPath);
if (null != command && command.contains(PlaceholderEnum.BIZ_SCRIPT_FILE.getName())){
String scriptPath = byteArrayToFile(remotePath,scriptParamAndPlaceholderDto);
log.info("-------------脚本所在路径为:{}-------------",scriptPath);
//初始化命令信息
command = PlaceholderUtils.initCommand(command,scriptPath);
}
//开始执行脚本
if(scriptParamAndPlaceholderDto != null){
command = PlaceholderUtils.commandReplace(command,scriptParamAndPlaceholderDto.getParam());
......@@ -147,7 +149,7 @@ public class ScriptExecutorServiceImpl implements ScriptExecutorService {
jobRunResultDto.setReturnResult(ReturnResult.FAIL);
e.printStackTrace();
}
log.info("-----------执行命令,{},{}-----------",command,scriptPath);
log.info("-----------执行命令,{}-----------",command);
//设置结束时间
jobRunResultDto.setEndTime(new Date());
jobRunResultDto.setLogId(scriptDto.getLogId());
......
package com.byit.factory;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.net.NetUtil;
import cn.hutool.core.util.NetUtil;
import com.byit.callback.DefaultRemainingOperationsCallBack;
import com.byit.callback.RemainingOperationsCallBack;
import com.byit.registry.DataSourceServiceRegistry;
......
......@@ -53,7 +53,7 @@
<!--<spring-cloud.version>Finchley.SR2</spring-cloud.version>-->
<spring-cloud.version>Dalston.RELEASE</spring-cloud.version>
<lombok.version>1.18.4</lombok.version>
<hutool.version>4.5.11</hutool.version>
<hutool.version>4.1.8</hutool.version>
<spring.boot.starter.mail.version>2.2.2.RELEASE</spring.boot.starter.mail.version>
<mybatis.spring.boot.starter>2.1.1</mybatis.spring.boot.starter>
<commons.lang3.version>3.9</commons.lang3.version>
......
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