diff --git a/doc/XXL-JOB官方文档.md b/doc/XXL-JOB官方文档.md index e6908506..bc93b83a 100644 --- a/doc/XXL-JOB官方文档.md +++ b/doc/XXL-JOB官方文档.md @@ -1428,7 +1428,8 @@ Tips: 历史版本(V1.3.x)目前已经Release至稳定版本, 进入维护阶段 - 14、新增Class的加载缓存,解决频繁加载Class会使jvm的方法区空间不足导致OOM的问题; - 15、调整首页报表默认区间为本周,避免日志量太大查询缓慢; - 16、LRU路由更新不及时问题修复; -- 17、[迭代中]任务线程隔离: +- 17、任务失败告警邮件发送逻辑优化; +- 18、[迭代中]任务线程隔离: - 执行器测异步响应,不存在阻塞不需要隔离; - 调度中心共用单一调度线程池,可能导致调度阻塞需要线程隔离;调度线程池拆分为Fast/Slow两个,针对调度较慢的执行器地址请求,降级使用Slow线程池;考虑是否可以任务级隔离线程池; diff --git a/xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobFailMonitorHelper.java b/xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobFailMonitorHelper.java index f2746bf8..c0a4f243 100644 --- a/xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobFailMonitorHelper.java +++ b/xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobFailMonitorHelper.java @@ -150,6 +150,7 @@ public class JobFailMonitorHelper { // send monitor email if (info!=null && info.getAlarmEmail()!=null && info.getAlarmEmail().trim().length()>0) { + // alarmContent String alarmContent = "Alarm Job LogId=" + jobLog.getId(); if (jobLog.getTriggerCode() != ReturnT.SUCCESS_CODE) { alarmContent += "
TriggerMsg=
" + jobLog.getTriggerMsg(); @@ -158,18 +159,18 @@ public class JobFailMonitorHelper { alarmContent += "
HandleCode=" + jobLog.getHandleMsg(); } + // email info + XxlJobGroup group = XxlJobAdminConfig.getAdminConfig().getXxlJobGroupDao().load(Integer.valueOf(info.getJobGroup())); + String personal = I18nUtil.getString("admin_name_full"); + String title = I18nUtil.getString("jobconf_monitor"); + String content = MessageFormat.format(mailBodyTemplate, + group!=null?group.getTitle():"null", + info.getId(), + info.getJobDesc(), + alarmContent); + Set emailSet = new HashSet(Arrays.asList(info.getAlarmEmail().split(","))); for (String email: emailSet) { - XxlJobGroup group = XxlJobAdminConfig.getAdminConfig().getXxlJobGroupDao().load(Integer.valueOf(info.getJobGroup())); - - String personal = I18nUtil.getString("admin_name_full"); - String title = I18nUtil.getString("jobconf_monitor"); - String content = MessageFormat.format(mailBodyTemplate, - group!=null?group.getTitle():"null", - info.getId(), - info.getJobDesc(), - alarmContent); - // make mail try { diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/thread/ExecutorRegistryThread.java b/xxl-job-core/src/main/java/com/xxl/job/core/thread/ExecutorRegistryThread.java index fddacc30..bf7a89ad 100644 --- a/xxl-job-core/src/main/java/com/xxl/job/core/thread/ExecutorRegistryThread.java +++ b/xxl-job-core/src/main/java/com/xxl/job/core/thread/ExecutorRegistryThread.java @@ -13,7 +13,7 @@ import java.util.concurrent.TimeUnit; /** * Created by xuxueli on 17/3/2. */ -public class ExecutorRegistryThread extends Thread { +public class ExecutorRegistryThread { private static Logger logger = LoggerFactory.getLogger(ExecutorRegistryThread.class); private static ExecutorRegistryThread instance = new ExecutorRegistryThread(); diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/thread/JobLogFileCleanThread.java b/xxl-job-core/src/main/java/com/xxl/job/core/thread/JobLogFileCleanThread.java index 3188ca34..8b983715 100644 --- a/xxl-job-core/src/main/java/com/xxl/job/core/thread/JobLogFileCleanThread.java +++ b/xxl-job-core/src/main/java/com/xxl/job/core/thread/JobLogFileCleanThread.java @@ -17,7 +17,7 @@ import java.util.concurrent.TimeUnit; * * @author xuxueli 2017-12-29 16:23:43 */ -public class JobLogFileCleanThread extends Thread { +public class JobLogFileCleanThread { private static Logger logger = LoggerFactory.getLogger(JobLogFileCleanThread.class); private static JobLogFileCleanThread instance = new JobLogFileCleanThread();