Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
byit-myth-job
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liyuan
byit-myth-job
Commits
56c4cfb2
Commit
56c4cfb2
authored
Oct 21, 2020
by
huangfusuper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试一个异常
parent
a7e6a60a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
+3
-7
CommandAndScriptProcessingMachine.java
...com/byit/node/impl/CommandAndScriptProcessingMachine.java
+3
-7
No files found.
byit-myth-executor/myth-executor-server/src/main/java/com/byit/node/impl/CommandAndScriptProcessingMachine.java
View file @
56c4cfb2
...
@@ -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
);
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment