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
68a0e9f2
Commit
68a0e9f2
authored
Aug 06, 2020
by
huangfusuper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修正邮箱告警有不对的地方
parent
3419e618
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
9 deletions
+12
-9
EmailEnum.java
...th-admin-core/src/main/java/com/byit/enums/EmailEnum.java
+2
-2
FlowServiceImpl.java
.../src/main/java/com/byit/service/impl/FlowServiceImpl.java
+2
-1
RunRecordingAndEmailServiceImpl.java
...vice/mapservice/impl/RunRecordingAndEmailServiceImpl.java
+2
-1
RunRecordingAndJobTaskServiceImpl.java
...ce/mapservice/impl/RunRecordingAndJobTaskServiceImpl.java
+1
-1
TaskAndLogServerImpl.java
...om/byit/service/mapservice/impl/TaskAndLogServerImpl.java
+1
-1
EndAndNotWarningThreadRunHelper.java
...m/byit/thread/helper/EndAndNotWarningThreadRunHelper.java
+4
-3
No files found.
byit-myth-core/myth-admin-core/src/main/java/com/byit/enums/EmailEnum.java
View file @
68a0e9f2
...
@@ -5,8 +5,8 @@ package com.byit.enums;
...
@@ -5,8 +5,8 @@ package com.byit.enums;
*/
*/
public
enum
EmailEnum
{
public
enum
EmailEnum
{
IS_ALARM_
YES
(
"1"
,
"已经
告警"
),
IS_ALARM_
NO
(
"1"
,
"没有
告警"
),
IS_ALARM_
NO
(
"0"
,
"没有
告警"
),
IS_ALARM_
YES
(
"0"
,
"已经
告警"
),
EMAIL_NOT_ALARML
(
"0"
,
"不告警"
),
EMAIL_NOT_ALARML
(
"0"
,
"不告警"
),
EMAIL_END_ALARML
(
"1"
,
"完成时告警"
),
EMAIL_END_ALARML
(
"1"
,
"完成时告警"
),
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/service/impl/FlowServiceImpl.java
View file @
68a0e9f2
...
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.byit.dto.FlowConditionDto
;
import
com.byit.dto.FlowConditionDto
;
import
com.byit.dto.StatisticsConditionDto
;
import
com.byit.dto.StatisticsConditionDto
;
import
com.byit.dto.web.ResponseResult
;
import
com.byit.dto.web.ResponseResult
;
import
com.byit.enums.EmailEnum
;
import
com.byit.enums.FlowPropertyEnum
;
import
com.byit.enums.FlowPropertyEnum
;
import
com.byit.enums.JobTriggerStatusEnums
;
import
com.byit.enums.JobTriggerStatusEnums
;
import
com.byit.enums.NodePropertyEnum
;
import
com.byit.enums.NodePropertyEnum
;
...
@@ -441,7 +442,7 @@ public class FlowServiceImpl implements FlowService {
...
@@ -441,7 +442,7 @@ public class FlowServiceImpl implements FlowService {
runRecording
.
setFlowStatus
(
"4"
);
runRecording
.
setFlowStatus
(
"4"
);
runRecording
.
setFlowRunResult
(
"5"
);
runRecording
.
setFlowRunResult
(
"5"
);
runRecording
.
setEndTime
(
new
Date
());
runRecording
.
setEndTime
(
new
Date
());
runRecording
.
setIsAlarm
(
"1"
);
runRecording
.
setIsAlarm
(
EmailEnum
.
IS_ALARM_NO
.
getCode
()
);
runRecordingMapper
.
updateRunRecordingById
(
runRecording
);
runRecordingMapper
.
updateRunRecordingById
(
runRecording
);
});
});
//杀死所有的任务
//杀死所有的任务
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/service/mapservice/impl/RunRecordingAndEmailServiceImpl.java
View file @
68a0e9f2
...
@@ -3,6 +3,7 @@ package com.byit.service.mapservice.impl;
...
@@ -3,6 +3,7 @@ package com.byit.service.mapservice.impl;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.date.DateUtil
;
import
com.byit.dto.EmailMappingDto
;
import
com.byit.dto.EmailMappingDto
;
import
com.byit.enums.EmailEnum
;
import
com.byit.model.EmailAlarm
;
import
com.byit.model.EmailAlarm
;
import
com.byit.model.JobTaskRunLogWithBLOBs
;
import
com.byit.model.JobTaskRunLogWithBLOBs
;
import
com.byit.model.RunRecording
;
import
com.byit.model.RunRecording
;
...
@@ -98,7 +99,7 @@ public class RunRecordingAndEmailServiceImpl implements RunRecordingAndEmailServ
...
@@ -98,7 +99,7 @@ public class RunRecordingAndEmailServiceImpl implements RunRecordingAndEmailServ
//保存邮箱
//保存邮箱
emailAlarmService
.
saveEmailAlarm
(
emailAlarm
);
emailAlarmService
.
saveEmailAlarm
(
emailAlarm
);
//修改为已告警
//修改为已告警
runRecording
.
setIsAlarm
(
"0"
);
runRecording
.
setIsAlarm
(
EmailEnum
.
IS_ALARM_YES
.
getCode
()
);
runRecordingService
.
updateRunRecordingById
(
runRecording
);
runRecordingService
.
updateRunRecordingById
(
runRecording
);
}
}
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/service/mapservice/impl/RunRecordingAndJobTaskServiceImpl.java
View file @
68a0e9f2
...
@@ -114,7 +114,7 @@ public class RunRecordingAndJobTaskServiceImpl implements RunRecordingAndJobTask
...
@@ -114,7 +114,7 @@ public class RunRecordingAndJobTaskServiceImpl implements RunRecordingAndJobTask
.
principal
(
virFlow
.
getPrincipal
())
.
principal
(
virFlow
.
getPrincipal
())
.
startTime
(
new
Date
())
.
startTime
(
new
Date
())
.
flowNodeCount
(
virFlow
.
getFlowNodeCount
())
.
flowNodeCount
(
virFlow
.
getFlowNodeCount
())
.
isAlarm
(
"1"
)
.
isAlarm
(
EmailEnum
.
IS_ALARM_NO
.
getCode
()
)
.
isInner
(
FlowPropertyEnum
.
IS_INNER
.
getCode
())
.
isInner
(
FlowPropertyEnum
.
IS_INNER
.
getCode
())
.
failFast
(
RunRecordingEnum
.
FAIL_FAST_NO
.
getCode
())
.
failFast
(
RunRecordingEnum
.
FAIL_FAST_NO
.
getCode
())
.
workspaceId
(
virFlow
.
getWorkspaceId
())
.
workspaceId
(
virFlow
.
getWorkspaceId
())
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/service/mapservice/impl/TaskAndLogServerImpl.java
View file @
68a0e9f2
...
@@ -126,7 +126,7 @@ public class TaskAndLogServerImpl implements TaskAndLogServer {
...
@@ -126,7 +126,7 @@ public class TaskAndLogServerImpl implements TaskAndLogServer {
.
startTime
(
new
Date
())
.
startTime
(
new
Date
())
.
flowNodeCount
(
virFlow
.
getFlowNodeCount
())
.
flowNodeCount
(
virFlow
.
getFlowNodeCount
())
//.isAlarm(mainRecording.getIsAlarm())
//.isAlarm(mainRecording.getIsAlarm())
.
isAlarm
(
"1"
)
.
isAlarm
(
EmailEnum
.
IS_ALARM_NO
.
getCode
()
)
.
isInner
(
FlowPropertyEnum
.
IS_INNER
.
getCode
())
.
isInner
(
FlowPropertyEnum
.
IS_INNER
.
getCode
())
.
failFast
(
RunRecordingEnum
.
FAIL_FAST_YES
.
getCode
())
.
failFast
(
RunRecordingEnum
.
FAIL_FAST_YES
.
getCode
())
.
workspaceId
(
virFlow
.
getWorkspaceId
())
.
workspaceId
(
virFlow
.
getWorkspaceId
())
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/thread/helper/EndAndNotWarningThreadRunHelper.java
View file @
68a0e9f2
package
com
.
byit
.
thread
.
helper
;
package
com
.
byit
.
thread
.
helper
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.byit.enums.EmailEnum
;
import
com.byit.enums.RunRecordingEnum
;
import
com.byit.enums.RunRecordingEnum
;
import
com.byit.model.RunRecording
;
import
com.byit.model.RunRecording
;
import
com.byit.service.RunRecordingService
;
import
com.byit.service.RunRecordingService
;
...
@@ -66,7 +67,7 @@ public class EndAndNotWarningThreadRunHelper extends BaseThreadRunHelper {
...
@@ -66,7 +67,7 @@ public class EndAndNotWarningThreadRunHelper extends BaseThreadRunHelper {
if
(
RunRecordingEnum
.
FLOW_STATUS_IS_END
.
getCode
().
equals
(
runRecording
.
getFlowStatus
()))
{
if
(
RunRecordingEnum
.
FLOW_STATUS_IS_END
.
getCode
().
equals
(
runRecording
.
getFlowStatus
()))
{
runRecordingAndEmailService
.
saveEmailAndRunRecording
(
runRecording
);
runRecordingAndEmailService
.
saveEmailAndRunRecording
(
runRecording
);
//修改为已告警
//修改为已告警
runRecording
.
setIsAlarm
(
"0"
);
runRecording
.
setIsAlarm
(
EmailEnum
.
IS_ALARM_YES
.
getCode
()
);
}
}
break
;
break
;
//失败时告警
//失败时告警
...
@@ -76,7 +77,7 @@ public class EndAndNotWarningThreadRunHelper extends BaseThreadRunHelper {
...
@@ -76,7 +77,7 @@ public class EndAndNotWarningThreadRunHelper extends BaseThreadRunHelper {
||
RunRecordingEnum
.
RUN_FLOW_RE_FAILURE
.
getCode
().
equals
(
runRecording
.
getFlowRunResult
()))
{
||
RunRecordingEnum
.
RUN_FLOW_RE_FAILURE
.
getCode
().
equals
(
runRecording
.
getFlowRunResult
()))
{
runRecordingAndEmailService
.
saveEmailAndRunRecording
(
runRecording
);
runRecordingAndEmailService
.
saveEmailAndRunRecording
(
runRecording
);
//修改为已告警
//修改为已告警
runRecording
.
setIsAlarm
(
"0"
);
runRecording
.
setIsAlarm
(
EmailEnum
.
IS_ALARM_YES
.
getCode
()
);
}
}
break
;
break
;
//成功时告警
//成功时告警
...
@@ -86,7 +87,7 @@ public class EndAndNotWarningThreadRunHelper extends BaseThreadRunHelper {
...
@@ -86,7 +87,7 @@ public class EndAndNotWarningThreadRunHelper extends BaseThreadRunHelper {
||
RunRecordingEnum
.
RUN_FLOW_RE_SUCCESS
.
getCode
().
equals
(
runRecording
.
getFlowRunResult
()))
{
||
RunRecordingEnum
.
RUN_FLOW_RE_SUCCESS
.
getCode
().
equals
(
runRecording
.
getFlowRunResult
()))
{
runRecordingAndEmailService
.
saveEmailAndRunRecording
(
runRecording
);
runRecordingAndEmailService
.
saveEmailAndRunRecording
(
runRecording
);
//修改为已告警
//修改为已告警
runRecording
.
setIsAlarm
(
"0"
);
runRecording
.
setIsAlarm
(
EmailEnum
.
IS_ALARM_YES
.
getCode
()
);
}
}
break
;
break
;
default
:
default
:
...
...
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