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
8741925d
Commit
8741925d
authored
Dec 14, 2020
by
huangfusuper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
单运行命令问题
parent
a0a90729
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
ScriptCommandTaskRunTheLifeCycleCallback.java
...rategy/task/ScriptCommandTaskRunTheLifeCycleCallback.java
+4
-0
ScriptFlowParamMergeTaskRunTheLifeCycleCallback.java
...task/ScriptFlowParamMergeTaskRunTheLifeCycleCallback.java
+4
-4
No files found.
byit-myth-core/myth-admin-core/src/main/java/com/byit/strategy/task/ScriptCommandTaskRunTheLifeCycleCallback.java
View file @
8741925d
...
...
@@ -46,6 +46,10 @@ public class ScriptCommandTaskRunTheLifeCycleCallback implements TaskRunTheLifeC
String
privateParam
=
runParamWrapped
.
getPrivateParam
();
ScriptParamAndPlaceholderDto
scriptParamAndPlaceholderDto
=
JSON
.
parseObject
(
privateParam
,
ScriptParamAndPlaceholderDto
.
class
);
String
command
=
jobTaskSchedule
.
getRunCommand
();
if
(!
command
.
startsWith
(
JAVA_TYPE
))
{
command
=
command
.
replaceAll
(
" "
,
"&&"
);
}
//脚本参数不为空的时候
if
(
scriptParamAndPlaceholderDto
!=
null
)
{
Map
<
String
,
String
>
param
=
scriptParamAndPlaceholderDto
.
getParam
();
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/strategy/task/ScriptParamMergeTaskRunTheLifeCycleCallback.java
→
byit-myth-core/myth-admin-core/src/main/java/com/byit/strategy/task/Script
Flow
ParamMergeTaskRunTheLifeCycleCallback.java
View file @
8741925d
...
...
@@ -19,7 +19,7 @@ import java.util.HashMap;
import
java.util.Map
;
/**
* 脚本参数合并 私有参数与共有参数合并
* 脚本参数合并
工作流执行节点下
私有参数与共有参数合并
*
* @author huangfu
* @date 2020年12月14日19:43:30
...
...
@@ -27,7 +27,7 @@ import java.util.Map;
@Component
@Slf4j
@MythRankOrder
(
5
)
public
class
ScriptParamMergeTaskRunTheLifeCycleCallback
implements
TaskRunTheLifeCycleCallback
{
public
class
Script
Flow
ParamMergeTaskRunTheLifeCycleCallback
implements
TaskRunTheLifeCycleCallback
{
private
final
StringRedisTemplate
stringRedisTemplate
;
private
final
RunRecordingService
runRecordingService
;
...
...
@@ -37,7 +37,7 @@ public class ScriptParamMergeTaskRunTheLifeCycleCallback implements TaskRunTheLi
*/
public
static
final
String
SCRIPT
=
"SCRIPT"
;
public
ScriptParamMergeTaskRunTheLifeCycleCallback
(
StringRedisTemplate
stringRedisTemplate
,
RunRecordingService
runRecordingService
)
{
public
Script
Flow
ParamMergeTaskRunTheLifeCycleCallback
(
StringRedisTemplate
stringRedisTemplate
,
RunRecordingService
runRecordingService
)
{
this
.
stringRedisTemplate
=
stringRedisTemplate
;
this
.
runRecordingService
=
runRecordingService
;
}
...
...
@@ -122,7 +122,7 @@ public class ScriptParamMergeTaskRunTheLifeCycleCallback implements TaskRunTheLi
throw
new
RuntimeException
(
String
.
format
(
"调度暂不支持此种类型的任务:%s"
,
jobType
));
}
boolean
equals
=
typeByCode
.
getType
().
equals
(
SCRIPT
);
boolean
isPlugin
=
!(
4
==
jobTaskSchedule
.
getScheduleType
()
);
boolean
isPlugin
=
4
!=
jobTaskSchedule
.
getScheduleType
(
);
return
equals
&&
isPlugin
;
}
}
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