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
7bc34204
Commit
7bc34204
authored
May 18, 2020
by
huangfusuper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
。。
parent
f1fed922
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
+7
-2
CommandAndScriptProcessingMachine.java
...com/byit/node/impl/CommandAndScriptProcessingMachine.java
+3
-0
ImperativeExecutionImpl.java
...c/main/java/com/byit/service/ImperativeExecutionImpl.java
+1
-2
ScriptExecutorServiceImpl.java
...main/java/com/byit/service/ScriptExecutorServiceImpl.java
+3
-0
No files found.
byit-myth-executor/myth-executor-server/src/main/java/com/byit/node/impl/CommandAndScriptProcessingMachine.java
View file @
7bc34204
...
@@ -60,10 +60,13 @@ public class CommandAndScriptProcessingMachine implements ProcessingMachine {
...
@@ -60,10 +60,13 @@ public class CommandAndScriptProcessingMachine implements ProcessingMachine {
log
.
debug
(
"-----执行命令初始化完成,命令为:[{}]------------"
,
command
);
log
.
debug
(
"-----执行命令初始化完成,命令为:[{}]------------"
,
command
);
scriptDto
.
setCommand
(
command
);
scriptDto
.
setCommand
(
command
);
}
}
if
(
paramAndPlaceholderDto
!=
null
)
{
//执行命令参数的替换
//执行命令参数的替换
command
=
PlaceholderUtils
.
commandReplace
(
command
,
paramAndPlaceholderDto
.
getParam
());
command
=
PlaceholderUtils
.
commandReplace
(
command
,
paramAndPlaceholderDto
.
getParam
());
log
.
debug
(
"-----命令参数替换完成,命令为:[{}]------------"
,
command
);
log
.
debug
(
"-----命令参数替换完成,命令为:[{}]------------"
,
command
);
scriptDto
.
setCommand
(
command
);
scriptDto
.
setCommand
(
command
);
}
//将脚本的携带的参数 拼接在命令后方 python test.py -sex 男 -name 张三 -age 14
//将脚本的携带的参数 拼接在命令后方 python test.py -sex 男 -name 张三 -age 14
log
.
info
(
"---------命令及脚本参数处理完成,此节点处理数据为:[{}]-----------"
,
scriptDto
);
log
.
info
(
"---------命令及脚本参数处理完成,此节点处理数据为:[{}]-----------"
,
scriptDto
);
...
...
byit-myth-executor/myth-executor-server/src/main/java/com/byit/service/ImperativeExecutionImpl.java
View file @
7bc34204
...
@@ -24,8 +24,7 @@ import java.util.Date;
...
@@ -24,8 +24,7 @@ import java.util.Date;
* 命令式方式执行的执行机
* 命令式方式执行的执行机
* @author huangfu
* @author huangfu
*/
*/
@Component
@RpcService
@Slf4j
@Slf4j
public
class
ImperativeExecutionImpl
implements
ScriptExecutorService
{
public
class
ImperativeExecutionImpl
implements
ScriptExecutorService
{
private
final
CommandAndScriptProcessingMachine
commandAndScriptProcessingMachine
;
private
final
CommandAndScriptProcessingMachine
commandAndScriptProcessingMachine
;
...
...
byit-myth-executor/myth-executor-server/src/main/java/com/byit/service/ScriptExecutorServiceImpl.java
View file @
7bc34204
...
@@ -19,6 +19,7 @@ import com.byit.utils.ServiceInfoUtil;
...
@@ -19,6 +19,7 @@ import com.byit.utils.ServiceInfoUtil;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.redis.core.StringRedisTemplate
;
import
org.springframework.data.redis.core.StringRedisTemplate
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.io.*
;
import
java.io.*
;
...
@@ -31,6 +32,8 @@ import java.util.*;
...
@@ -31,6 +32,8 @@ import java.util.*;
* 脚本执行的实现
* 脚本执行的实现
* @author huangfu
* @author huangfu
*/
*/
@Component
@RpcService
@Slf4j
@Slf4j
public
class
ScriptExecutorServiceImpl
implements
ScriptExecutorService
{
public
class
ScriptExecutorServiceImpl
implements
ScriptExecutorService
{
/**
/**
...
...
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