提交 c48cb6eb 编写于 作者: 许雪里's avatar 许雪里

Glue(Shell) 等脚本任务支持失败重试;

上级 ea5b3541
......@@ -925,7 +925,7 @@ echo "分片总数 total = $3"
--- | --- | ---
成功 | IJobHandler.SUCCESS | 0
失败 | IJobHandler.FAIL | -1(其他)
失败重试 | IJobHandler.FAIL_RETRY | 501
失败重试 | IJobHandler.FAIL_RETRY | 101
## 六、版本更新日志
......
......@@ -45,7 +45,7 @@
SELECT <include refid="Base_Column_List" />
FROM XXL_JOB_QRTZ_TRIGGER_LOG AS t
<trim prefix="WHERE" prefixOverrides="AND | OR" >
<if test="jobGroup != null and jobGroup != ''">
<if test="jobGroup gt 0">
AND t.job_group = #{jobGroup}
</if>
<if test="jobId gt 0">
......@@ -62,12 +62,13 @@
</if>
<if test="logStatus == 2" >
AND (
(t.trigger_code <![CDATA[ > ]]> 0 AND t.trigger_code!=200) ||
(t.handle_code <![CDATA[ > ]]> 0 AND t.handle_code!=200)
t.trigger_code NOT IN (0, 200) ||
t.handle_code NOT IN (0, 200)
)
</if>
<if test="logStatus == 3" >
AND (t.trigger_code = 200 AND t.handle_code=0)
AND t.trigger_code = 200
AND t.handle_code = 0
</if>
</trim>
ORDER BY id DESC
......@@ -78,7 +79,7 @@
SELECT count(1)
FROM XXL_JOB_QRTZ_TRIGGER_LOG AS t
<trim prefix="WHERE" prefixOverrides="AND | OR" >
<if test="jobGroup != null and jobGroup != ''">
<if test="jobGroup gt 0">
AND t.job_group = #{jobGroup}
</if>
<if test="jobId gt 0">
......@@ -95,12 +96,13 @@
</if>
<if test="logStatus == 2" >
AND (
(t.trigger_code <![CDATA[ > ]]> 0 AND t.trigger_code!=200) ||
(t.handle_code <![CDATA[ > ]]> 0 AND t.handle_code!=200)
t.trigger_code NOT IN (0, 200) ||
t.handle_code NOT IN (0, 200)
)
</if>
<if test="logStatus == 3" >
AND (t.trigger_code = 200 AND t.handle_code=0)
AND t.trigger_code = 200
AND t.handle_code = 0
</if>
</trim>
</select>
......
......@@ -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<String>(IJobHandler.FAIL.getCode(), "script exit value("+exitValue+") is failed");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册