Browse Source

feat: add task priority in alert info (#14919)

Co-authored-by: Jim Chen <chenshuai19950725@gmail.com>
Co-authored-by: Aaron Wang <wangweirao16@gmail.com>
3.2.1-prepare
Chenshuai 1 year ago committed by GitHub
parent
commit
6dcc26f52e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ProcessAlertContent.java
  2. 2
      dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskAlertContent.java
  3. 3
      dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/alert/ProcessAlertManager.java

2
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ProcessAlertContent.java

@ -91,6 +91,8 @@ public class ProcessAlertContent implements Serializable {
private Date taskEndTime;
@JsonProperty("taskHost")
private String taskHost;
@JsonProperty("taskPriority")
private String taskPriority;
@JsonProperty("logPath")
private String logPath;

2
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskAlertContent.java

@ -60,6 +60,8 @@ public class TaskAlertContent implements Serializable {
private Date endTime;
@JsonProperty("host")
private String host;
@JsonProperty("taskPriority")
private String taskPriority;
@JsonProperty("logPath")
private String logPath;

3
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/alert/ProcessAlertManager.java

@ -144,6 +144,7 @@ public class ProcessAlertManager {
.taskStartTime(task.getStartTime())
.taskEndTime(task.getEndTime())
.taskHost(task.getHost())
.taskPriority(task.getTaskInstancePriority().getDescp())
.logPath(task.getLogPath())
.build();
failedTaskList.add(processAlertContent);
@ -173,6 +174,7 @@ public class ProcessAlertManager {
.taskCode(taskInstance.getTaskCode())
.taskName(taskInstance.getName())
.taskHost(taskInstance.getHost())
.taskPriority(taskInstance.getTaskInstancePriority().getDescp())
.retryTimes(taskInstance.getRetryTimes())
.build();
toleranceTaskInstanceList.add(processAlertContent);
@ -387,6 +389,7 @@ public class ProcessAlertManager {
.startTime(taskInstance.getStartTime())
.endTime(taskInstance.getEndTime())
.host(taskInstance.getHost())
.taskPriority(taskInstance.getTaskInstancePriority().getDescp())
.logPath(taskInstance.getLogPath())
.build();

Loading…
Cancel
Save