Unverified Commit 2884c722 authored by zhu-mingye's avatar zhu-mingye Committed by GitHub

fix Send msg bug by alert Instance disable (#1359)

parent c47fb71a
...@@ -1287,7 +1287,7 @@ public class TaskServiceImpl extends SuperServiceImpl<TaskMapper, Task> implemen ...@@ -1287,7 +1287,7 @@ public class TaskServiceImpl extends SuperServiceImpl<TaskMapper, Task> implemen
String exceptionUrl = "http://" + jobManagerHost + "/#/job/" + jobInstance.getJid() + "/exceptions"; String exceptionUrl = "http://" + jobManagerHost + "/#/job/" + jobInstance.getJid() + "/exceptions";
for (AlertInstance alertInstance : alertGroup.getInstances()) { for (AlertInstance alertInstance : alertGroup.getInstances()) {
if (alertInstance == null) { if (alertInstance == null || (Asserts.isNotNull(alertInstance.getEnabled()) && !alertInstance.getEnabled())) {
continue; continue;
} }
Map<String, String> map = JSONUtil.toMap(alertInstance.getParams()); Map<String, String> map = JSONUtil.toMap(alertInstance.getParams());
......
...@@ -76,7 +76,7 @@ public final class FeiShuSender { ...@@ -76,7 +76,7 @@ public final class FeiShuSender {
FeiShuSender(Map<String, String> config) { FeiShuSender(Map<String, String> config) {
url = config.get(FeiShuConstants.WEB_HOOK); url = config.get(FeiShuConstants.WEB_HOOK);
msgType = config.get(FeiShuConstants.MSG_TYPE); msgType = config.get(FeiShuConstants.MSG_TYPE);
keyword = config.get(FeiShuConstants.KEY_WORD).replace("\r\n", ""); keyword = config.get(FeiShuConstants.KEY_WORD) != null ? config.get(FeiShuConstants.KEY_WORD).replace("\r\n", "") : "";
enableProxy = Boolean.valueOf(config.get(FeiShuConstants.FEI_SHU_PROXY_ENABLE)); enableProxy = Boolean.valueOf(config.get(FeiShuConstants.FEI_SHU_PROXY_ENABLE));
secret = config.get(FeiShuConstants.SECRET); secret = config.get(FeiShuConstants.SECRET);
if (Boolean.TRUE.equals(enableProxy)) { if (Boolean.TRUE.equals(enableProxy)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment