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
2917851d
Commit
2917851d
authored
Apr 22, 2020
by
huangfusuper
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
c8c0e154
e18c171a
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
4 deletions
+18
-4
pom.xml
byit-myth-executor/myth-executor-server/pom.xml
+12
-0
ScriptExecutorServiceImpl.java
...main/java/com/byit/service/ScriptExecutorServiceImpl.java
+4
-2
PluginServerFactory.java
...r/src/main/java/com/byit/factory/PluginServerFactory.java
+1
-1
pom.xml
pom.xml
+1
-1
No files found.
byit-myth-executor/myth-executor-server/pom.xml
View file @
2917851d
...
...
@@ -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>
...
...
byit-myth-executor/myth-executor-server/src/main/java/com/byit/service/ScriptExecutorServiceImpl.java
View file @
2917851d
...
...
@@ -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
);
}
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
());
...
...
byit-plugin-core/myth-plugin-rpc-server/src/main/java/com/byit/factory/PluginServerFactory.java
View file @
2917851d
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
;
...
...
pom.xml
View file @
2917851d
...
...
@@ -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>
...
...
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