Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
熊鹏飞
/
xxljob220
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
c48cb6eb
authored
Apr 28, 2018
by
xuxueli
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Glue(Shell) 等脚本任务支持失败重试;
parent
ea5b3541
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
11 deletions
doc/XXL-JOB官方文档.md
xxl-job-admin/src/main/resources/mybatis-mapper/XxlJobLogMapper.xml
xxl-job-core/src/main/java/com/xxl/job/core/handler/impl/ScriptJobHandler.java
doc/XXL-JOB官方文档.md
View file @
c48cb6eb
## 《分
布式任务调度平台XXL-JOB》
## 《分
布式任务调度平台XXL-JOB》
...
...
@@ -925,7 +925,7 @@ echo "分片总数 total = $3"
--- | --- | ---
成功 | IJobHandler.SUCCESS | 0
失败 | IJobHandler.FAIL | -1(其他)
失败重试 | IJobHandler.FAIL_RETRY |
5
01
失败重试 | IJobHandler.FAIL_RETRY |
1
01
## 六、版本更新日志
...
...
xxl-job-admin/src/main/resources/mybatis-mapper/XxlJobLogMapper.xml
View file @
c48cb6eb
...
...
@@ -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>
...
...
xxl-job-core/src/main/java/com/xxl/job/core/handler/impl/ScriptJobHandler.java
View file @
c48cb6eb
...
...
@@ -66,7 +66,7 @@ public class ScriptJobHandler extends IJobHandler {
if
(
exitValue
==
0
)
{
return
IJobHandler
.
SUCCESS
;
}
else
if
(
exitValue
==
5
01
)
{
}
else
if
(
exitValue
==
1
01
)
{
return
IJobHandler
.
FAIL_RETRY
;
}
else
{
return
new
ReturnT
<
String
>(
IJobHandler
.
FAIL
.
getCode
(),
"script exit value("
+
exitValue
+
") is failed"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment