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
7d28c309
Commit
7d28c309
authored
May 09, 2020
by
huangfusuper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
替换BUG
parent
3f6bdaaa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
ApiNodeServiceImpl.java
...c/main/java/com/byit/service/impl/ApiNodeServiceImpl.java
+8
-1
ScheduleThreadRunHelper.java
.../java/com/byit/thread/helper/ScheduleThreadRunHelper.java
+1
-1
ScriptExecutorServiceImpl.java
...main/java/com/byit/service/ScriptExecutorServiceImpl.java
+0
-2
No files found.
byit-myth-admin/src/main/java/com/byit/service/impl/ApiNodeServiceImpl.java
View file @
7d28c309
...
@@ -83,7 +83,7 @@ public class ApiNodeServiceImpl implements ApiNodeService {
...
@@ -83,7 +83,7 @@ public class ApiNodeServiceImpl implements ApiNodeService {
schedule
.
setRunParam
(
PlaceholderUtils
.
formatParam
(
schedule
.
getRunParam
()));
schedule
.
setRunParam
(
PlaceholderUtils
.
formatParam
(
schedule
.
getRunParam
()));
String
runCommand
=
schedule
.
getRunCommand
();
String
runCommand
=
schedule
.
getRunCommand
();
if
(
StringUtils
.
isNotBlank
(
runCommand
))
{
if
(
StringUtils
.
isNotBlank
(
runCommand
))
{
runCommand
.
replace
(
"${"
+
PlaceholderEnum
.
DATE_PLACEHOLDER
.
getName
()
+
"}"
,
DateUtil
.
dateLessDayStr
(
new
Date
(),
"yyyyMMdd"
,
1
));
runCommand
=
runCommand
.
replace
(
"${"
+
PlaceholderEnum
.
DATE_PLACEHOLDER
.
getName
()
+
"}"
,
DateUtil
.
dateLessDayStr
(
new
Date
(),
"yyyyMMdd"
,
1
));
schedule
.
setRunCommand
(
runCommand
);
schedule
.
setRunCommand
(
runCommand
);
}
}
...
@@ -106,6 +106,13 @@ public class ApiNodeServiceImpl implements ApiNodeService {
...
@@ -106,6 +106,13 @@ public class ApiNodeServiceImpl implements ApiNodeService {
return
runKey
;
return
runKey
;
}
}
public
static
void
main
(
String
[]
args
)
{
String
jat
=
"java -jar -Djava.security.egd=file:/dev/./urandom /ddmp/sqlEngine/ddmp-engine.jar {isReRun:false,jobId:5446,type:\"sql\",engineId:425,exterPath:\"/ddmp/sqlEngine\",storeType:\"redis\",contentKey:\"JOBCONTENT.5446.e8jC5STc\",tenant:0000,bizDate:\"${biz_date}\"}"
;
jat
=
jat
.
replace
(
"${"
+
PlaceholderEnum
.
DATE_PLACEHOLDER
.
getName
()
+
"}"
,
DateUtil
.
dateLessDayStr
(
new
Date
(),
"yyyyMMdd"
,
1
));
System
.
out
.
println
(
jat
);
}
@Override
@Override
public
List
<
JobTaskRunLog
>
runHistory
(
String
nodeId
)
{
public
List
<
JobTaskRunLog
>
runHistory
(
String
nodeId
)
{
ValidationUtil
.
dataNotBank
(
nodeId
,
"nodeId不允许为空!"
);
ValidationUtil
.
dataNotBank
(
nodeId
,
"nodeId不允许为空!"
);
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/thread/helper/ScheduleThreadRunHelper.java
View file @
7d28c309
...
@@ -59,7 +59,7 @@ public class ScheduleThreadRunHelper extends BaseThreadRunHelper {
...
@@ -59,7 +59,7 @@ public class ScheduleThreadRunHelper extends BaseThreadRunHelper {
}
}
String
command
=
mythJobTaskSchedule
.
getRunCommand
();
String
command
=
mythJobTaskSchedule
.
getRunCommand
();
assert
command
!=
null
;
assert
command
!=
null
;
command
.
replace
(
"${"
+
PlaceholderEnum
.
DATE_PLACEHOLDER
.
getName
()+
"}"
,
DateUtil
.
dateLessDayStr
(
new
Date
(),
"yyyyMMdd"
,
1
));
command
=
command
.
replace
(
"${"
+
PlaceholderEnum
.
DATE_PLACEHOLDER
.
getName
()+
"}"
,
DateUtil
.
dateLessDayStr
(
new
Date
(),
"yyyyMMdd"
,
1
));
mythJobTaskSchedule
.
setRunCommand
(
command
);
mythJobTaskSchedule
.
setRunCommand
(
command
);
Long
triggerTime
=
mythJobTaskSchedule
.
getTriggerTime
();
Long
triggerTime
=
mythJobTaskSchedule
.
getTriggerTime
();
TimerTask
timerTask
=
null
;
TimerTask
timerTask
=
null
;
...
...
byit-myth-executor/myth-executor-server/src/main/java/com/byit/service/ScriptExecutorServiceImpl.java
View file @
7d28c309
...
@@ -125,8 +125,6 @@ public class ScriptExecutorServiceImpl implements ScriptExecutorService {
...
@@ -125,8 +125,6 @@ public class ScriptExecutorServiceImpl implements ScriptExecutorService {
if
(
scriptParamAndPlaceholderDto
!=
null
){
if
(
scriptParamAndPlaceholderDto
!=
null
){
command
=
PlaceholderUtils
.
commandReplace
(
command
,
scriptParamAndPlaceholderDto
.
getParam
());
command
=
PlaceholderUtils
.
commandReplace
(
command
,
scriptParamAndPlaceholderDto
.
getParam
());
}
}
assert
command
!=
null
;
command
.
replace
(
"${"
+
PlaceholderEnum
.
DATE_PLACEHOLDER
.
getName
()+
"}"
,
DateUtil
.
dateLessDayStr
(
new
Date
(),
"yyyyMMdd"
,
1
));
List
<
String
>
cmdList
=
Arrays
.
asList
(
command
.
split
(
" "
));
List
<
String
>
cmdList
=
Arrays
.
asList
(
command
.
split
(
" "
));
MythJobProcess
mythJobProcess
=
new
MythJobProcess
(
cmdList
,
null
,
null
,
scriptDto
.
getLogId
(),
stringRedisTemplate
);
MythJobProcess
mythJobProcess
=
new
MythJobProcess
(
cmdList
,
null
,
null
,
scriptDto
.
getLogId
(),
stringRedisTemplate
);
//保存日志
//保存日志
...
...
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