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
9c33bda5
Commit
9c33bda5
authored
Nov 09, 2020
by
huangfusuper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
java参数替换 命令日志信息更新
parent
f169f30f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
1 deletion
+16
-1
ApiFlowOperatingServiceImpl.java
...va/com/byit/service/impl/ApiFlowOperatingServiceImpl.java
+12
-0
ScriptExecutorJobTask.java
...re/src/main/java/com/byit/task/ScriptExecutorJobTask.java
+2
-0
JobUtils.java
...xecutor-plugin/src/main/java/com/byit/utils/JobUtils.java
+2
-1
No files found.
byit-myth-admin/src/main/java/com/byit/service/impl/ApiFlowOperatingServiceImpl.java
View file @
9c33bda5
...
...
@@ -45,6 +45,7 @@ import java.util.stream.Collectors;
public
class
ApiFlowOperatingServiceImpl
implements
ApiFlowOperatingService
{
public
static
final
String
JAVA_TYPE
=
"java"
;
@Value
(
"${server.port}"
)
private
Integer
serverPort
;
...
...
@@ -139,6 +140,17 @@ public class ApiFlowOperatingServiceImpl implements ApiFlowOperatingService {
//构建参数
node
.
setRunParam
(
JSON
.
toJSONString
(
runParamWrapped
));
}
String
runCommand
=
node
.
getRunCommand
();
if
(
StringUtils
.
isNoneBlank
(
runCommand
)){
if
(
runCommand
.
startsWith
(
JAVA_TYPE
)
&&
CollectionUtil
.
isNotEmpty
(
publicParam
)){
publicParam
.
forEach
((
k
,
v
)
->{
String
keyName
=
String
.
format
(
"${%s}"
,
k
);
runCommand
.
replace
(
keyName
,
v
);
});
node
.
setRunCommand
(
runCommand
);
}
}
});
}
if
(
CollectionUtil
.
isNotEmpty
(
nodeRelyDtoSet
))
{
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/task/ScriptExecutorJobTask.java
View file @
9c33bda5
...
...
@@ -269,6 +269,8 @@ public class ScriptExecutorJobTask implements TimerTask {
jobTaskRunLog
.
setRunType
(
RunTypeEnum
.
EXECUTIVE_MACHINE_RUN
.
getCode
());
jobTaskRunLog
.
setJobType
(
mythJobTaskSchedule
.
getJobType
());
jobTaskRunLog
.
setHandlerName
(
mythJobTaskSchedule
.
getHandlerName
());
jobTaskRunLog
.
setRunCommand
(
mythJobTaskSchedule
.
getRunCommand
());
jobTaskRunLog
.
setRunParams
(
mythJobTaskSchedule
.
getRunParam
());
jobTaskRunLog
.
setTriggerTime
(
new
Date
());
String
code
=
RunResultEnum
.
TRIGGER_SUCCESS
.
getCode
();
//放置调度码 调度失败 那么执行肯定也失败
...
...
byit-myth-executor/myth-executor-plugin/src/main/java/com/byit/utils/JobUtils.java
View file @
9c33bda5
...
...
@@ -45,7 +45,8 @@ public class JobUtils {
/**
* 根据运行标识查询工作流的状态
*/
private
static
final
String
FIND_RUNRECORDING_STATUS_BY_RUNID
=
"/api/find/runRecording/findRunRecordingStatusByRunId"
;
/**
private
static
final
String
FIND_RUNRECORDING_STATUS_BY_RUNID
=
"/api/find/runRecording/findRunRecordingStatusByRunId"
;
/**
* 根据工作流名称和工作空间名称查询工作流的状态
*/
private
static
final
String
FIND_RUNRECORDING_STATUS_BY_FLOWNAME_AND_WORKSPACENAME
=
"/api/find/runRecording/findRunRecordingStatusByFlowNameAndWorkspaceName"
;
...
...
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