From 440116e67ed3f881ec3d228b9c8e73108133cf9f Mon Sep 17 00:00:00 2001 From: xuxueli <931591021@qq.com> Date: Wed, 11 Oct 2017 21:57:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BB=BB=E5=8A=A1=E7=9B=91?= =?UTF-8?q?=E6=8E=A7=E7=BA=BF=E7=A8=8B=E6=97=A0=E6=B3=95=E7=9B=91=E6=8E=A7?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E8=A7=A6=E5=8F=91=E5=92=8C=E6=89=A7=E8=A1=8C?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E5=9D=87=E6=9C=AA0=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/XXL-JOB官方文档.md | 9 +++++++-- .../xxl/job/admin/core/thread/JobFailMonitorHelper.java | 9 +++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/doc/XXL-JOB官方文档.md b/doc/XXL-JOB官方文档.md index 13a15a6d..a7221e84 100644 --- a/doc/XXL-JOB官方文档.md +++ b/doc/XXL-JOB官方文档.md @@ -1020,8 +1020,10 @@ Tips: 历史版本(V1.3.x)目前已经Release至稳定版本, 进入维护阶段 ### 6.20 版本 V1.9.0 特性[迭代中] - 1、新增任务运行模式 "GLUE模式(NodeJS) ",支持NodeJS脚本任务; -- 2、修复任务监控线程被耗时任务阻塞的问题; -- 3、失败告警策略扩展:默认提供邮件失败告警,可扩展短信等,扩展代码位置为 "JobFailMonitorHelper.failAlarm"; +- 2、失败告警策略扩展:默认提供邮件失败告警,可扩展短信等,扩展代码位置为 "JobFailMonitorHelper.failAlarm"; +- 3、修复任务监控线程被耗时任务阻塞的问题; +- 4、修复任务监控线程无法监控任务触发和执行状态均未0的问题; + ### TODO LIST - 1、任务权限管理:执行器为粒度分配权限,核心操作校验权限; @@ -1036,6 +1038,9 @@ Tips: 历史版本(V1.3.x)目前已经Release至稳定版本, 进入维护阶段 - 10、任务类方法"IJobHandler.execute"的参数类型改为"string",进一步方便参数传递;任务注解和任务类统一并改为"JobHandler""; - 11、任务日志,记录发起调度的机器信息; - 12、任务告警逻辑调整:任务调度,以及任务回调失败时,均推送监控队列。后期考虑通过任务Log字段控制告警状态; +- 13、执行器Log清理功能:调度中心Log删除时同步删除执行器中的Log文件; +- 14、脚本任务 Shell、Python和Nodejs,如何友好获取分片参数; +- 15、Bean模式任务,JobHandler自动从执行器中查询展示为下拉框,选择后自动填充任务名称等属性; ## 七、其他 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 797f1b1d..991d5106 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 @@ -54,15 +54,16 @@ public class JobFailMonitorHelper { if (ReturnT.SUCCESS_CODE == log.getTriggerCode() && log.getHandleCode() == 0) { JobFailMonitorHelper.monitor(jobLogId); logger.info(">>>>>>>>>>> job monitor, job running, JobLogId:{}", jobLogId); - } - if (ReturnT.SUCCESS_CODE == log.getTriggerCode() && ReturnT.SUCCESS_CODE == log.getHandleCode()) { + } else if (ReturnT.SUCCESS_CODE == log.getTriggerCode() && ReturnT.SUCCESS_CODE == log.getHandleCode()) { // job success, pass logger.info(">>>>>>>>>>> job monitor, job success, JobLogId:{}", jobLogId); - } - if (ReturnT.FAIL_CODE == log.getTriggerCode() || ReturnT.FAIL_CODE == log.getHandleCode()) { + } else if (ReturnT.FAIL_CODE == log.getTriggerCode() || ReturnT.FAIL_CODE == log.getHandleCode()) { // job fail, failAlarm(log); logger.info(">>>>>>>>>>> job monitor, job fail, JobLogId:{}", jobLogId); + } else { + JobFailMonitorHelper.monitor(jobLogId); + logger.info(">>>>>>>>>>> job monitor, job unknown, JobLogId:{}", jobLogId); } } }