From c48cb6eb2563e679bf6f70fcf234f622d99dc723 Mon Sep 17 00:00:00 2001 From: xuxueli <931591021@qq.com> Date: Sat, 28 Apr 2018 19:48:07 +0800 Subject: [PATCH] =?UTF-8?q?Glue(Shell)=20=E7=AD=89=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=94=AF=E6=8C=81=E5=A4=B1=E8=B4=A5=E9=87=8D?= =?UTF-8?q?=E8=AF=95=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/XXL-JOB官方文档.md | 2 +- .../mybatis-mapper/XxlJobLogMapper.xml | 18 ++++++++++-------- .../core/handler/impl/ScriptJobHandler.java | 2 +- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/doc/XXL-JOB官方文档.md b/doc/XXL-JOB官方文档.md index 66029efb..4418c9ae 100644 --- a/doc/XXL-JOB官方文档.md +++ b/doc/XXL-JOB官方文档.md @@ -925,7 +925,7 @@ echo "分片总数 total = $3" --- | --- | --- 成功 | IJobHandler.SUCCESS | 0 失败 | IJobHandler.FAIL | -1(其他) -失败重试 | IJobHandler.FAIL_RETRY | 501 +失败重试 | IJobHandler.FAIL_RETRY | 101 ## 六、版本更新日志 diff --git a/xxl-job-admin/src/main/resources/mybatis-mapper/XxlJobLogMapper.xml b/xxl-job-admin/src/main/resources/mybatis-mapper/XxlJobLogMapper.xml index a16abaf5..1721b1ba 100644 --- a/xxl-job-admin/src/main/resources/mybatis-mapper/XxlJobLogMapper.xml +++ b/xxl-job-admin/src/main/resources/mybatis-mapper/XxlJobLogMapper.xml @@ -45,7 +45,7 @@ SELECT FROM XXL_JOB_QRTZ_TRIGGER_LOG AS t - + AND t.job_group = #{jobGroup} @@ -62,12 +62,13 @@ AND ( - (t.trigger_code ]]> 0 AND t.trigger_code!=200) || - (t.handle_code ]]> 0 AND t.handle_code!=200) + t.trigger_code NOT IN (0, 200) || + t.handle_code NOT IN (0, 200) ) - AND (t.trigger_code = 200 AND t.handle_code=0) + AND t.trigger_code = 200 + AND t.handle_code = 0 ORDER BY id DESC @@ -78,7 +79,7 @@ SELECT count(1) FROM XXL_JOB_QRTZ_TRIGGER_LOG AS t - + AND t.job_group = #{jobGroup} @@ -95,12 +96,13 @@ AND ( - (t.trigger_code ]]> 0 AND t.trigger_code!=200) || - (t.handle_code ]]> 0 AND t.handle_code!=200) + t.trigger_code NOT IN (0, 200) || + t.handle_code NOT IN (0, 200) ) - AND (t.trigger_code = 200 AND t.handle_code=0) + AND t.trigger_code = 200 + AND t.handle_code = 0 diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/handler/impl/ScriptJobHandler.java b/xxl-job-core/src/main/java/com/xxl/job/core/handler/impl/ScriptJobHandler.java index b6e017ec..7cad6461 100644 --- a/xxl-job-core/src/main/java/com/xxl/job/core/handler/impl/ScriptJobHandler.java +++ b/xxl-job-core/src/main/java/com/xxl/job/core/handler/impl/ScriptJobHandler.java @@ -66,7 +66,7 @@ public class ScriptJobHandler extends IJobHandler { if (exitValue == 0) { return IJobHandler.SUCCESS; - } else if (exitValue == 501) { + } else if (exitValue == 101) { return IJobHandler.FAIL_RETRY; } else { return new ReturnT(IJobHandler.FAIL.getCode(), "script exit value("+exitValue+") is failed");