Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
tool
/
xxl-job
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit be0da67c
authored
Aug 18, 2021
by
xueli.xue
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'master' of
https://github.com/xuxueli/xxl-job
into master
2 parents
f7fa7216
fa6a47ca
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
14 deletions
xxl-job-admin/src/main/java/com/xxl/job/admin/core/complete/XxlJobCompleter.java
xxl-job-admin/src/test/java/com/xxl/job/adminbiz/AdminBizTest.java
xxl-job-core/src/main/java/com/xxl/job/core/context/XxlJobContext.java
xxl-job-core/src/main/java/com/xxl/job/core/context/XxlJobHelper.java
xxl-job-core/src/main/java/com/xxl/job/core/thread/JobThread.java
xxl-job-admin/src/main/java/com/xxl/job/admin/core/complete/XxlJobCompleter.java
View file @
be0da67
...
@@ -47,7 +47,7 @@ public class XxlJobCompleter {
...
@@ -47,7 +47,7 @@ public class XxlJobCompleter {
// 1、handle success, to trigger child job
// 1、handle success, to trigger child job
String
triggerChildMsg
=
null
;
String
triggerChildMsg
=
null
;
if
(
XxlJobContext
.
HANDLE_CO
C
E_SUCCESS
==
xxlJobLog
.
getHandleCode
())
{
if
(
XxlJobContext
.
HANDLE_CO
D
E_SUCCESS
==
xxlJobLog
.
getHandleCode
())
{
XxlJobInfo
xxlJobInfo
=
XxlJobAdminConfig
.
getAdminConfig
().
getXxlJobInfoDao
().
loadById
(
xxlJobLog
.
getJobId
());
XxlJobInfo
xxlJobInfo
=
XxlJobAdminConfig
.
getAdminConfig
().
getXxlJobInfoDao
().
loadById
(
xxlJobLog
.
getJobId
());
if
(
xxlJobInfo
!=
null
&&
xxlJobInfo
.
getChildJobId
()!=
null
&&
xxlJobInfo
.
getChildJobId
().
trim
().
length
()>
0
)
{
if
(
xxlJobInfo
!=
null
&&
xxlJobInfo
.
getChildJobId
()!=
null
&&
xxlJobInfo
.
getChildJobId
().
trim
().
length
()>
0
)
{
triggerChildMsg
=
"<br><br><span style=\"color:#00c0ef;\" > >>>>>>>>>>>"
+
I18nUtil
.
getString
(
"jobconf_trigger_child_run"
)
+
"<<<<<<<<<<< </span><br>"
;
triggerChildMsg
=
"<br><br><span style=\"color:#00c0ef;\" > >>>>>>>>>>>"
+
I18nUtil
.
getString
(
"jobconf_trigger_child_run"
)
+
"<<<<<<<<<<< </span><br>"
;
...
...
xxl-job-admin/src/test/java/com/xxl/job/adminbiz/AdminBizTest.java
View file @
be0da67
...
@@ -32,7 +32,7 @@ public class AdminBizTest {
...
@@ -32,7 +32,7 @@ public class AdminBizTest {
HandleCallbackParam
param
=
new
HandleCallbackParam
();
HandleCallbackParam
param
=
new
HandleCallbackParam
();
param
.
setLogId
(
1
);
param
.
setLogId
(
1
);
param
.
setHandleCode
(
XxlJobContext
.
HANDLE_CO
C
E_SUCCESS
);
param
.
setHandleCode
(
XxlJobContext
.
HANDLE_CO
D
E_SUCCESS
);
List
<
HandleCallbackParam
>
callbackParamList
=
Arrays
.
asList
(
param
);
List
<
HandleCallbackParam
>
callbackParamList
=
Arrays
.
asList
(
param
);
...
...
xxl-job-core/src/main/java/com/xxl/job/core/context/XxlJobContext.java
View file @
be0da67
...
@@ -8,9 +8,9 @@ package com.xxl.job.core.context;
...
@@ -8,9 +8,9 @@ package com.xxl.job.core.context;
*/
*/
public
class
XxlJobContext
{
public
class
XxlJobContext
{
public
static
final
int
HANDLE_CO
C
E_SUCCESS
=
200
;
public
static
final
int
HANDLE_CO
D
E_SUCCESS
=
200
;
public
static
final
int
HANDLE_CO
C
E_FAIL
=
500
;
public
static
final
int
HANDLE_CO
D
E_FAIL
=
500
;
public
static
final
int
HANDLE_CO
C
E_TIMEOUT
=
502
;
public
static
final
int
HANDLE_CO
D
E_TIMEOUT
=
502
;
// ---------------------- base info ----------------------
// ---------------------- base info ----------------------
...
@@ -68,7 +68,7 @@ public class XxlJobContext {
...
@@ -68,7 +68,7 @@ public class XxlJobContext {
this
.
shardIndex
=
shardIndex
;
this
.
shardIndex
=
shardIndex
;
this
.
shardTotal
=
shardTotal
;
this
.
shardTotal
=
shardTotal
;
this
.
handleCode
=
HANDLE_CO
C
E_SUCCESS
;
// default success
this
.
handleCode
=
HANDLE_CO
D
E_SUCCESS
;
// default success
}
}
public
long
getJobId
()
{
public
long
getJobId
()
{
...
...
xxl-job-core/src/main/java/com/xxl/job/core/context/XxlJobHelper.java
View file @
be0da67
...
@@ -177,7 +177,7 @@ public class XxlJobHelper {
...
@@ -177,7 +177,7 @@ public class XxlJobHelper {
* @return
* @return
*/
*/
public
static
boolean
handleSuccess
(){
public
static
boolean
handleSuccess
(){
return
handleResult
(
XxlJobContext
.
HANDLE_CO
C
E_SUCCESS
,
null
);
return
handleResult
(
XxlJobContext
.
HANDLE_CO
D
E_SUCCESS
,
null
);
}
}
/**
/**
...
@@ -187,7 +187,7 @@ public class XxlJobHelper {
...
@@ -187,7 +187,7 @@ public class XxlJobHelper {
* @return
* @return
*/
*/
public
static
boolean
handleSuccess
(
String
handleMsg
)
{
public
static
boolean
handleSuccess
(
String
handleMsg
)
{
return
handleResult
(
XxlJobContext
.
HANDLE_CO
C
E_SUCCESS
,
handleMsg
);
return
handleResult
(
XxlJobContext
.
HANDLE_CO
D
E_SUCCESS
,
handleMsg
);
}
}
/**
/**
...
@@ -196,7 +196,7 @@ public class XxlJobHelper {
...
@@ -196,7 +196,7 @@ public class XxlJobHelper {
* @return
* @return
*/
*/
public
static
boolean
handleFail
(){
public
static
boolean
handleFail
(){
return
handleResult
(
XxlJobContext
.
HANDLE_CO
C
E_FAIL
,
null
);
return
handleResult
(
XxlJobContext
.
HANDLE_CO
D
E_FAIL
,
null
);
}
}
/**
/**
...
@@ -206,7 +206,7 @@ public class XxlJobHelper {
...
@@ -206,7 +206,7 @@ public class XxlJobHelper {
* @return
* @return
*/
*/
public
static
boolean
handleFail
(
String
handleMsg
)
{
public
static
boolean
handleFail
(
String
handleMsg
)
{
return
handleResult
(
XxlJobContext
.
HANDLE_CO
C
E_FAIL
,
handleMsg
);
return
handleResult
(
XxlJobContext
.
HANDLE_CO
D
E_FAIL
,
handleMsg
);
}
}
/**
/**
...
@@ -215,7 +215,7 @@ public class XxlJobHelper {
...
@@ -215,7 +215,7 @@ public class XxlJobHelper {
* @return
* @return
*/
*/
public
static
boolean
handleTimeout
(){
public
static
boolean
handleTimeout
(){
return
handleResult
(
XxlJobContext
.
HANDLE_CO
C
E_TIMEOUT
,
null
);
return
handleResult
(
XxlJobContext
.
HANDLE_CO
D
E_TIMEOUT
,
null
);
}
}
/**
/**
...
@@ -225,7 +225,7 @@ public class XxlJobHelper {
...
@@ -225,7 +225,7 @@ public class XxlJobHelper {
* @return
* @return
*/
*/
public
static
boolean
handleTimeout
(
String
handleMsg
){
public
static
boolean
handleTimeout
(
String
handleMsg
){
return
handleResult
(
XxlJobContext
.
HANDLE_CO
C
E_TIMEOUT
,
handleMsg
);
return
handleResult
(
XxlJobContext
.
HANDLE_CO
D
E_TIMEOUT
,
handleMsg
);
}
}
/**
/**
...
...
xxl-job-core/src/main/java/com/xxl/job/core/thread/JobThread.java
View file @
be0da67
...
@@ -215,7 +215,7 @@ public class JobThread extends Thread{
...
@@ -215,7 +215,7 @@ public class JobThread extends Thread{
TriggerCallbackThread
.
pushCallBack
(
new
HandleCallbackParam
(
TriggerCallbackThread
.
pushCallBack
(
new
HandleCallbackParam
(
triggerParam
.
getLogId
(),
triggerParam
.
getLogId
(),
triggerParam
.
getLogDateTime
(),
triggerParam
.
getLogDateTime
(),
XxlJobContext
.
HANDLE_CO
C
E_FAIL
,
XxlJobContext
.
HANDLE_CO
D
E_FAIL
,
stopReason
+
" [job running, killed]"
)
stopReason
+
" [job running, killed]"
)
);
);
}
}
...
@@ -231,7 +231,7 @@ public class JobThread extends Thread{
...
@@ -231,7 +231,7 @@ public class JobThread extends Thread{
TriggerCallbackThread
.
pushCallBack
(
new
HandleCallbackParam
(
TriggerCallbackThread
.
pushCallBack
(
new
HandleCallbackParam
(
triggerParam
.
getLogId
(),
triggerParam
.
getLogId
(),
triggerParam
.
getLogDateTime
(),
triggerParam
.
getLogDateTime
(),
XxlJobContext
.
HANDLE_CO
C
E_FAIL
,
XxlJobContext
.
HANDLE_CO
D
E_FAIL
,
stopReason
+
" [job not executed, in the job queue, killed.]"
)
stopReason
+
" [job not executed, in the job queue, killed.]"
)
);
);
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment