提交 73b6484d authored 作者: xueli.xue's avatar xueli.xue

coding

上级 3e5bc1e3
...@@ -40,7 +40,8 @@ public class HandlerRouter { ...@@ -40,7 +40,8 @@ public class HandlerRouter {
JobThread jobThread = new JobThread(handler); JobThread jobThread = new JobThread(handler);
jobThread.start(); jobThread.start();
logger.info(">>>>>>>>>>> xxl-job regist JobThread success, jobkey:{}, handler:{}", new Object[]{jobkey, handler}); logger.info(">>>>>>>>>>> xxl-job regist JobThread success, jobkey:{}, handler:{}", new Object[]{jobkey, handler});
return HandlerRouter.JobThreadRepository.put(jobkey, jobThread); // putIfAbsent HandlerRouter.JobThreadRepository.put(jobkey, jobThread); // putIfAbsent | oh my god, map's put method return the old value!!!
return jobThread;
} }
public static JobThread loadJobThread(String jobKey){ public static JobThread loadJobThread(String jobKey){
return HandlerRouter.JobThreadRepository.get(jobKey); return HandlerRouter.JobThreadRepository.get(jobKey);
......
...@@ -61,11 +61,6 @@ public class RunAction extends IAction { ...@@ -61,11 +61,6 @@ public class RunAction extends IAction {
} }
} }
// sometime, cmap.get can not return given value, i do not know why
if (jobThread == null) {
jobThread = HandlerRouter.loadJobThread(jobKey);
}
// push data to queue // push data to queue
jobThread.pushTriggerQueue(requestModel); jobThread.pushTriggerQueue(requestModel);
return new ResponseModel(ResponseModel.SUCCESS, null); return new ResponseModel(ResponseModel.SUCCESS, null);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论