任务线程名优化(ISSUE-2527)

pull/34/head
xueli.xue 3 years ago
parent 135abc3719
commit 9fe7aaa12e

@ -2185,8 +2185,9 @@ public void execute() {
- 重试任务:失败时,新增主任务。所有调度记录,包括入口调度和重试调度,均挂载主任务上。
- 2、【优化】[规划中]分片任务:全部完成后才会出发后置节点;
- 3、【优化】多个项目依赖升级至较新稳定版本如netty、groovy、spring、springboot等
- 3、【优化】合并多项PR代码结构、代码变量和注释等多项优化调整
- 4、【修复】邮箱校验逻辑下放至EmailJobAlarm中避免对其他告警方式的干扰
- 4、【优化】合并多项PR代码结构、代码变量和注释等多项优化调整
- 5、【优化】任务线程名优化(ISSUE-2527)
- 6、【修复】邮箱校验逻辑下放至EmailJobAlarm中避免对其他告警方式的干扰
### 7.33 版本 v2.4.0 Release Notes[规划中]
- 1、[规划中]DAG流程任务

@ -52,7 +52,7 @@ public class EmbedServer {
new ThreadFactory() {
@Override
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() {

@ -44,6 +44,9 @@ public class JobThread extends Thread{
this.handler = handler;
this.triggerQueue = new LinkedBlockingQueue<TriggerParam>();
this.triggerLogIdSet = Collections.synchronizedSet(new HashSet<Long>());
// assign job thread name
this.setName("xxl-job, JobThread-"+jobId+"-"+System.currentTimeMillis());
}
public IJobHandler getHandler() {
return handler;

@ -53,7 +53,7 @@ public class NetUtil {
serverSocket = new ServerSocket(port);
used = false;
} catch (IOException e) {
logger.info(">>>>>>>>>>> xxl-rpc, port[{}] is in use.", port);
logger.info(">>>>>>>>>>> xxl-job, port[{}] is in use.", port);
used = true;
} finally {
if (serverSocket != null) {

@ -118,7 +118,7 @@ public class XxlJobRemotingUtil {
// valid StatusCode
int statusCode = connection.getResponseCode();
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
@ -135,13 +135,13 @@ public class XxlJobRemotingUtil {
ReturnT returnT = GsonTool.fromJson(resultJson, ReturnT.class, returnTargClassOfT);
return returnT;
} catch (Exception e) {
logger.error("xxl-rpc remoting (url="+url+") response content invalid("+ resultJson +").", e);
return new ReturnT<String>(ReturnT.FAIL_CODE, "xxl-rpc remoting (url="+url+") response content invalid("+ resultJson +").");
logger.error("xxl-job remoting (url="+url+") response content invalid("+ resultJson +").", e);
return new ReturnT<String>(ReturnT.FAIL_CODE, "xxl-job remoting (url="+url+") response content invalid("+ resultJson +").");
}
} catch (Exception 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 {
try {
if (bufferedReader != null) {

Loading…
Cancel
Save