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 9fe7aaa1
authored
Aug 18, 2021
by
xueli.xue
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
任务线程名优化(ISSUE-2527)
1 parent
135abc37
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
8 deletions
doc/XXL-JOB官方文档.md
xxl-job-core/src/main/java/com/xxl/job/core/server/EmbedServer.java
xxl-job-core/src/main/java/com/xxl/job/core/thread/JobThread.java
xxl-job-core/src/main/java/com/xxl/job/core/util/NetUtil.java
xxl-job-core/src/main/java/com/xxl/job/core/util/XxlJobRemotingUtil.java
doc/XXL-JOB官方文档.md
View file @
9fe7aaa
...
@@ -2185,8 +2185,9 @@ public void execute() {
...
@@ -2185,8 +2185,9 @@ public void execute() {
-
重试任务:失败时,新增主任务。所有调度记录,包括入口调度和重试调度,均挂载主任务上。
-
重试任务:失败时,新增主任务。所有调度记录,包括入口调度和重试调度,均挂载主任务上。
-
2、【优化】
[
规划中
]
分片任务:全部完成后才会出发后置节点;
-
2、【优化】
[
规划中
]
分片任务:全部完成后才会出发后置节点;
-
3、【优化】多个项目依赖升级至较新稳定版本,如netty、groovy、spring、springboot等;
-
3、【优化】多个项目依赖升级至较新稳定版本,如netty、groovy、spring、springboot等;
-
3、【优化】合并多项PR:代码结构、代码变量和注释等多项优化调整;
-
4、【优化】合并多项PR:代码结构、代码变量和注释等多项优化调整;
-
4、【修复】邮箱校验逻辑下放至EmailJobAlarm中,避免对其他告警方式的干扰;
-
5、【优化】任务线程名优化(ISSUE-2527)
-
6、【修复】邮箱校验逻辑下放至EmailJobAlarm中,避免对其他告警方式的干扰;
### 7.33 版本 v2.4.0 Release Notes[规划中]
### 7.33 版本 v2.4.0 Release Notes[规划中]
-
1、
[
规划中
]
DAG流程任务
-
1、
[
规划中
]
DAG流程任务
...
...
xxl-job-core/src/main/java/com/xxl/job/core/server/EmbedServer.java
View file @
9fe7aaa
...
@@ -52,7 +52,7 @@ public class EmbedServer {
...
@@ -52,7 +52,7 @@ public class EmbedServer {
new
ThreadFactory
()
{
new
ThreadFactory
()
{
@Override
@Override
public
Thread
newThread
(
Runnable
r
)
{
public
Thread
newThread
(
Runnable
r
)
{
return
new
Thread
(
r
,
"xxl-
rpc
, EmbedServer bizThreadPool-"
+
r
.
hashCode
());
return
new
Thread
(
r
,
"xxl-
job
, EmbedServer bizThreadPool-"
+
r
.
hashCode
());
}
}
},
},
new
RejectedExecutionHandler
()
{
new
RejectedExecutionHandler
()
{
...
...
xxl-job-core/src/main/java/com/xxl/job/core/thread/JobThread.java
View file @
9fe7aaa
...
@@ -44,6 +44,9 @@ public class JobThread extends Thread{
...
@@ -44,6 +44,9 @@ public class JobThread extends Thread{
this
.
handler
=
handler
;
this
.
handler
=
handler
;
this
.
triggerQueue
=
new
LinkedBlockingQueue
<
TriggerParam
>();
this
.
triggerQueue
=
new
LinkedBlockingQueue
<
TriggerParam
>();
this
.
triggerLogIdSet
=
Collections
.
synchronizedSet
(
new
HashSet
<
Long
>());
this
.
triggerLogIdSet
=
Collections
.
synchronizedSet
(
new
HashSet
<
Long
>());
// assign job thread name
this
.
setName
(
"xxl-job, JobThread-"
+
jobId
+
"-"
+
System
.
currentTimeMillis
());
}
}
public
IJobHandler
getHandler
()
{
public
IJobHandler
getHandler
()
{
return
handler
;
return
handler
;
...
...
xxl-job-core/src/main/java/com/xxl/job/core/util/NetUtil.java
View file @
9fe7aaa
...
@@ -53,7 +53,7 @@ public class NetUtil {
...
@@ -53,7 +53,7 @@ public class NetUtil {
serverSocket
=
new
ServerSocket
(
port
);
serverSocket
=
new
ServerSocket
(
port
);
used
=
false
;
used
=
false
;
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
logger
.
info
(
">>>>>>>>>>> xxl-
rpc
, port[{}] is in use."
,
port
);
logger
.
info
(
">>>>>>>>>>> xxl-
job
, port[{}] is in use."
,
port
);
used
=
true
;
used
=
true
;
}
finally
{
}
finally
{
if
(
serverSocket
!=
null
)
{
if
(
serverSocket
!=
null
)
{
...
...
xxl-job-core/src/main/java/com/xxl/job/core/util/XxlJobRemotingUtil.java
View file @
9fe7aaa
...
@@ -118,7 +118,7 @@ public class XxlJobRemotingUtil {
...
@@ -118,7 +118,7 @@ public class XxlJobRemotingUtil {
// valid StatusCode
// valid StatusCode
int
statusCode
=
connection
.
getResponseCode
();
int
statusCode
=
connection
.
getResponseCode
();
if
(
statusCode
!=
200
)
{
if
(
statusCode
!=
200
)
{
return
new
ReturnT
<
String
>(
ReturnT
.
FAIL_CODE
,
"xxl-
rpc
remoting fail, StatusCode("
+
statusCode
+
") invalid. for url : "
+
url
);
return
new
ReturnT
<
String
>(
ReturnT
.
FAIL_CODE
,
"xxl-
job
remoting fail, StatusCode("
+
statusCode
+
") invalid. for url : "
+
url
);
}
}
// result
// result
...
@@ -135,13 +135,13 @@ public class XxlJobRemotingUtil {
...
@@ -135,13 +135,13 @@ public class XxlJobRemotingUtil {
ReturnT
returnT
=
GsonTool
.
fromJson
(
resultJson
,
ReturnT
.
class
,
returnTargClassOfT
);
ReturnT
returnT
=
GsonTool
.
fromJson
(
resultJson
,
ReturnT
.
class
,
returnTargClassOfT
);
return
returnT
;
return
returnT
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"xxl-
rpc
remoting (url="
+
url
+
") response content invalid("
+
resultJson
+
")."
,
e
);
logger
.
error
(
"xxl-
job
remoting (url="
+
url
+
") response content invalid("
+
resultJson
+
")."
,
e
);
return
new
ReturnT
<
String
>(
ReturnT
.
FAIL_CODE
,
"xxl-
rpc
remoting (url="
+
url
+
") response content invalid("
+
resultJson
+
")."
);
return
new
ReturnT
<
String
>(
ReturnT
.
FAIL_CODE
,
"xxl-
job
remoting (url="
+
url
+
") response content invalid("
+
resultJson
+
")."
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
e
.
getMessage
(),
e
);
logger
.
error
(
e
.
getMessage
(),
e
);
return
new
ReturnT
<
String
>(
ReturnT
.
FAIL_CODE
,
"xxl-
rpc
remoting error("
+
e
.
getMessage
()
+
"), for url : "
+
url
);
return
new
ReturnT
<
String
>(
ReturnT
.
FAIL_CODE
,
"xxl-
job
remoting error("
+
e
.
getMessage
()
+
"), for url : "
+
url
);
}
finally
{
}
finally
{
try
{
try
{
if
(
bufferedReader
!=
null
)
{
if
(
bufferedReader
!=
null
)
{
...
...
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