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
ca9264b1
Commit
ca9264b1
authored
Sep 25, 2020
by
huangfusuper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修正追加日志
parent
9079b758
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
1 deletion
+23
-1
ApiNodeServiceImpl.java
...c/main/java/com/byit/service/impl/ApiNodeServiceImpl.java
+2
-0
JavaNodeExecutorTask.java
...ore/src/main/java/com/byit/task/JavaNodeExecutorTask.java
+10
-1
RunNode.java
...h-dto-core/src/main/java/com/byit/dto/plugin/RunNode.java
+11
-0
No files found.
byit-myth-admin/src/main/java/com/byit/service/impl/ApiNodeServiceImpl.java
View file @
ca9264b1
...
...
@@ -84,6 +84,7 @@ public class ApiNodeServiceImpl implements ApiNodeService {
String
runParam
=
runNode
.
getRunParam
();
RunParamWrapped
runParamWrapped
=
new
RunParamWrapped
();
runParamWrapped
.
setPrivateParam
(
runParam
);
runParamWrapped
.
setPublicParamMap
(
runNode
.
getPublicParam
());
schedule
.
setNodeId
(
Integer
.
valueOf
(
runNode
.
getNodeId
()));
schedule
.
setRunId
(
runId
);
...
...
@@ -91,6 +92,7 @@ public class ApiNodeServiceImpl implements ApiNodeService {
schedule
.
setIsVirtual
(
NodePropertyEnum
.
ISNOT_VIRTUAL
.
getCode
());
schedule
.
setRunParam
(
JSON
.
toJSONString
(
runParamWrapped
));
schedule
.
setRunCommand
(
runNode
.
getRunCmd
());
schedule
.
setNodeDesc
(
runNode
.
getHasAddLogToFlow
());
schedule
.
setRunSource
(
runNode
.
getRunSource
());
schedule
.
setScriptUrls
(
runNode
.
getScriptUrl
());
schedule
.
setJobType
(
runNode
.
getJobType
());
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/task/JavaNodeExecutorTask.java
View file @
ca9264b1
...
...
@@ -41,6 +41,8 @@ public class JavaNodeExecutorTask implements TimerTask {
public
static
final
String
HTTP_PRE
=
"http://"
;
public
static
final
String
HTTP_SUFFIX
=
"/myth-job-admin/api/callback/callbackRes"
;
public
static
final
String
HTTP_SUFFIX_FLOW
=
"/myth-job-admin/api/callback/flowFreeNodeCallbackRes"
;
private
final
JobTaskSchedule
mythJobTaskSchedule
;
public
JavaNodeExecutorTask
(
JobTaskSchedule
mythJobTaskSchedule
)
{
...
...
@@ -69,6 +71,7 @@ public class JavaNodeExecutorTask implements TimerTask {
}
private
void
runJob
(
JobTaskSchedule
mythJobTaskSchedule
)
{
String
hasRelatedFlow
=
mythJobTaskSchedule
.
getNodeDesc
();
RunJavaServiceImpl
service
=
SpringUtil
.
getBean
(
RunJavaServiceImpl
.
class
);
JobTaskRunLogServiceImpl
jobTaskRunLogService
=
SpringUtil
.
getBean
(
JobTaskRunLogServiceImpl
.
class
);
JobTaskRunLogWithBLOBs
jobTaskRunLogById
=
null
;
...
...
@@ -85,7 +88,13 @@ public class JavaNodeExecutorTask implements TimerTask {
PluginRpcRequestPacket
request
=
new
PluginRpcRequestPacket
();
GetRegConfig
getRegConfig
=
SpringUtil
.
getBean
(
GetRegConfig
.
class
);
TreeSet
<
String
>
gatewayConf
=
getRegConfig
.
getGatewayConf
();
List
<
String
>
callUrlList
=
gatewayConf
.
stream
().
map
(
callbackIp
->
String
.
format
(
"%s%s%s"
,
HTTP_PRE
,
callbackIp
,
HTTP_SUFFIX
)).
collect
(
Collectors
.
toList
());
List
<
String
>
callUrlList
=
gatewayConf
.
stream
().
map
(
callbackIp
->
{
if
(
"2"
.
equals
(
hasRelatedFlow
)){
return
String
.
format
(
"%s%s%s"
,
HTTP_PRE
,
callbackIp
,
HTTP_SUFFIX
);
}
else
{
return
String
.
format
(
"%s%s%s"
,
HTTP_PRE
,
callbackIp
,
HTTP_SUFFIX_FLOW
);
}
}).
collect
(
Collectors
.
toList
());
request
.
setCallbackUrl
(
JSON
.
toJSONString
(
callUrlList
));
CommunicationParam
communicationParam
=
new
CommunicationParam
();
...
...
byit-myth-core/myth-dto-core/src/main/java/com/byit/dto/plugin/RunNode.java
View file @
ca9264b1
...
...
@@ -3,6 +3,7 @@ package com.byit.dto.plugin;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Map
;
/**
* @Description 运行节点信息
...
...
@@ -50,5 +51,15 @@ public class RunNode implements Serializable {
*/
private
String
jobType
;
/**
* 是否进行日志追加 1 不用追加 2 追加
*/
private
String
hasAddLogToFlow
=
"1"
;
/**
* 公共参数
*/
private
Map
<
String
,
String
>
publicParam
;
private
static
final
long
serialVersionUID
=
2L
;
}
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