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
ef5a5d42
Commit
ef5a5d42
authored
Dec 04, 2020
by
huangfusuper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修正重启停止节点报错
parent
af9cbd4b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
7 deletions
+14
-7
FlowServiceImpl.java
.../src/main/java/com/byit/service/impl/FlowServiceImpl.java
+12
-5
CommandAndScriptProcessingMachine.java
...com/byit/node/impl/CommandAndScriptProcessingMachine.java
+2
-2
No files found.
byit-myth-core/myth-admin-core/src/main/java/com/byit/service/impl/FlowServiceImpl.java
View file @
ef5a5d42
...
@@ -517,13 +517,20 @@ public class FlowServiceImpl implements FlowService {
...
@@ -517,13 +517,20 @@ public class FlowServiceImpl implements FlowService {
String
killUrl
=
"http://"
+
exectUrl
+
"/myth-executor-server/processManager/killJob"
;
String
killUrl
=
"http://"
+
exectUrl
+
"/myth-executor-server/processManager/killJob"
;
Map
<
String
,
Object
>
requestMap
=
new
HashMap
<>(
2
);
Map
<
String
,
Object
>
requestMap
=
new
HashMap
<>(
2
);
requestMap
.
put
(
"logId"
,
logId
);
requestMap
.
put
(
"logId"
,
logId
);
String
killResult
=
HttpUtil
.
post
(
killUrl
,
requestMap
);
try
{
log
.
info
(
"请求结果{}"
,
killResult
);
String
killResult
=
HttpUtil
.
post
(
killUrl
,
requestMap
);
ResponseResult
responseResult
=
JSON
.
parseObject
(
killResult
,
ResponseResult
.
class
);
log
.
info
(
"请求结果{}"
,
killResult
);
if
(!
"SUCCESS"
.
equals
(
responseResult
.
getResult
()))
{
ResponseResult
responseResult
=
JSON
.
parseObject
(
killResult
,
ResponseResult
.
class
);
errorMsg
.
append
(
"【"
).
append
(
nodeName
).
append
(
"】杀死失败,错误信息为:"
).
append
(
responseResult
.
getMsg
());
if
(!
"SUCCESS"
.
equals
(
responseResult
.
getResult
()))
{
errorMsg
.
append
(
"【"
).
append
(
nodeName
).
append
(
"】杀死失败,错误信息为:"
).
append
(
responseResult
.
getMsg
());
return
false
;
}
}
catch
(
Exception
e
)
{
errorMsg
.
append
(
"【"
).
append
(
nodeName
).
append
(
"】杀死失败,错误信息为:"
).
append
(
e
.
getMessage
());
return
false
;
return
false
;
}
}
return
true
;
return
true
;
}
}
...
...
byit-myth-executor/myth-executor-server/src/main/java/com/byit/node/impl/CommandAndScriptProcessingMachine.java
View file @
ef5a5d42
...
@@ -60,7 +60,7 @@ public class CommandAndScriptProcessingMachine implements ProcessingMachine {
...
@@ -60,7 +60,7 @@ public class CommandAndScriptProcessingMachine implements ProcessingMachine {
}
}
//判断是否需要拉取文件服务器的文件,包含biz_file的条件下会对这个字段进行替换
//判断是否需要拉取文件服务器的文件,包含biz_file的条件下会对这个字段进行替换
if
(
StringUtils
.
isNoneBlank
(
scriptDto
.
getRemotePath
()))
{
if
(
StringUtils
.
isNoneBlank
(
scriptDto
.
getRemotePath
()))
{
//这里需要解压压缩包 然后将
//这里需要解压压缩包 然后将
压缩包删除
String
scriptDirPath
=
byteArrayToSource
(
scriptDto
.
getRemotePath
());
String
scriptDirPath
=
byteArrayToSource
(
scriptDto
.
getRemotePath
());
log
.
debug
(
"-----远程地址的文件被拉取到:[{}]------------"
,
scriptDirPath
);
log
.
debug
(
"-----远程地址的文件被拉取到:[{}]------------"
,
scriptDirPath
);
log
.
debug
(
"-----执行命令初始化完成,命令为:[{}]------------"
,
command
);
log
.
debug
(
"-----执行命令初始化完成,命令为:[{}]------------"
,
command
);
...
@@ -73,7 +73,7 @@ public class CommandAndScriptProcessingMachine implements ProcessingMachine {
...
@@ -73,7 +73,7 @@ public class CommandAndScriptProcessingMachine implements ProcessingMachine {
processingNodeChain
.
doProcessing
(
scriptDto
,
processingNodeChain
);
processingNodeChain
.
doProcessing
(
scriptDto
,
processingNodeChain
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"{}"
,
ExecutorLogUtil
.
getMessage
(
e
));
log
.
error
(
"{}"
,
ExecutorLogUtil
.
getMessage
(
e
));
throw
new
ExecutorException
(
e
);
throw
new
ExecutorException
(
ExecutorLogUtil
.
getMessage
(
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