优化在JobThread尝试30次后销毁任务时,并发插入到triggerQueue中任务会失败的场景

master
xyyz150 5 years ago
parent 4dabb4b1a0
commit d35bc02336
  1. 4
      xxl-job-core/src/main/java/com/xxl/job/core/thread/JobThread.java

@ -165,7 +165,9 @@ public class JobThread extends Thread{
} else {
if (idleTimes > 30) {
XxlJobExecutor.removeJobThread(jobId, "excutor idel times over limit.");
if(triggerQueue ==null||triggerQueue.size()==0) {
XxlJobExecutor.removeJobThread(jobId, "excutor idel times over limit.");
}
}
}
} catch (Throwable e) {

Loading…
Cancel
Save