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
01ee08de
Commit
01ee08de
authored
May 13, 2020
by
guominglei
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
fb4752af
93498e54
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
3 deletions
+24
-3
RunRecordingAndEmailServiceImpl.java
...vice/mapservice/impl/RunRecordingAndEmailServiceImpl.java
+8
-1
MakeUpFlowThreadRunHelper.java
...ava/com/byit/thread/helper/MakeUpFlowThreadRunHelper.java
+7
-0
MythJobProcess.java
...server/src/main/java/com/byit/process/MythJobProcess.java
+7
-1
LogGobbler.java
...cutor-server/src/main/java/com/byit/utils/LogGobbler.java
+2
-1
No files found.
byit-myth-core/myth-admin-core/src/main/java/com/byit/service/mapservice/impl/RunRecordingAndEmailServiceImpl.java
View file @
01ee08de
...
...
@@ -12,6 +12,7 @@ import com.byit.service.RunRecordingService;
import
com.byit.service.mapservice.RunRecordingAndEmailService
;
import
com.byit.util.TimeFormatUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Component
;
import
java.io.IOException
;
...
...
@@ -104,8 +105,14 @@ public class RunRecordingAndEmailServiceImpl implements RunRecordingAndEmailServ
*/
String
logStr
=
null
;
try
{
if
(
null
!=
jobTaskRunLog
.
getLogRemotelyPath
(
)){
if
(
StringUtils
.
isNotBlank
(
jobTaskRunLog
.
getLogRemotelyPath
()
)){
logStr
=
new
String
(
fileSystem
.
downloaderFile
(
jobTaskRunLog
.
getLogRemotelyPath
()),
StandardCharsets
.
UTF_8
);
}
else
if
(
StringUtils
.
isNotBlank
(
jobTaskRunLog
.
getRunMsg
()))
{
logStr
=
jobTaskRunLog
.
getRunMsg
();
}
else
if
(
StringUtils
.
isNotBlank
(
jobTaskRunLog
.
getTriggerMsg
())){
logStr
=
jobTaskRunLog
.
getTriggerMsg
();
}
else
{
logStr
=
"未知异常,出现此错误属于系统错误,请联系myth-job-admin开发团队!"
;
}
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/thread/helper/MakeUpFlowThreadRunHelper.java
View file @
01ee08de
...
...
@@ -59,7 +59,14 @@ public class MakeUpFlowThreadRunHelper extends BaseThreadRunHelper {
nextRunFlow
.
forEach
((
key
,
value
)
->{
/*保证数据为串行*/
try
{
Thread
.
sleep
(
100
);
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
}
boolean
runRecordingIsRunning
=
runRecordingService
.
findRunRecordingIsRunning
(
value
.
getFlowId
());
log
.
info
(
"-------{}的运行状态为{}"
,
value
,
runRecordingIsRunning
);
if
(!
runRecordingIsRunning
){
runRecordingAndJobTaskService
.
updateRunRecordingAndTask
(
value
);
}
...
...
byit-myth-executor/myth-executor-server/src/main/java/com/byit/process/MythJobProcess.java
View file @
01ee08de
...
...
@@ -88,7 +88,13 @@ public class MythJobProcess implements Callable<String>{
@SneakyThrows
@Override
public
String
call
()
{
RunLog
startRunLog
=
RunLog
.
builder
().
isEnd
(
false
).
runLog
(
"start"
).
build
();
//stringRedisTemplate.convertAndSend(runKey, JSON.toJSONString(runLog, WriteClassName))
//TODO 向队尾追加一个日志
Long
startLong
=
stringRedisTemplate
.
opsForList
().
rightPush
(
runKey
,
JSON
.
toJSONString
(
startRunLog
,
WriteClassName
));
if
(
startLong
<=
0
){
log
.
error
(
"------日志信息加入redis异常,{}---------"
,
startLong
);
}
//判断是否执行过
if
(
this
.
isStarted
()
||
this
.
isComplete
())
{
throw
new
IllegalStateException
(
"该过程只能使用一次"
);
...
...
byit-myth-executor/myth-executor-server/src/main/java/com/byit/utils/LogGobbler.java
View file @
01ee08de
...
...
@@ -46,7 +46,8 @@ public class LogGobbler extends Thread {
runLog
.
setRunLog
(
line
);
//stringRedisTemplate.convertAndSend(runKey, JSON.toJSONString(runLog, WriteClassName))
//TODO 向队列队尾插入一个值
stringRedisTemplate
.
opsForList
().
rightPush
(
runKey
,
JSON
.
toJSONString
(
runLog
,
WriteClassName
));
Long
aLong
=
stringRedisTemplate
.
opsForList
().
rightPush
(
runKey
,
JSON
.
toJSONString
(
runLog
,
WriteClassName
));
log
.
info
(
"-------{}-------"
,
aLong
);
printLog
(
line
);
}
}
catch
(
final
IOException
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