From d35bc0233682ee97834d098c6f10c4fdca2014cf Mon Sep 17 00:00:00 2001 From: xyyz150 Date: Sun, 20 Oct 2019 11:44:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=9C=A8JobThread=E5=B0=9D?= =?UTF-8?q?=E8=AF=9530=E6=AC=A1=E5=90=8E=E9=94=80=E6=AF=81=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E6=97=B6=EF=BC=8C=E5=B9=B6=E5=8F=91=E6=8F=92=E5=85=A5?= =?UTF-8?q?=E5=88=B0triggerQueue=E4=B8=AD=E4=BB=BB=E5=8A=A1=E4=BC=9A?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E7=9A=84=E5=9C=BA=E6=99=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/xxl/job/core/thread/JobThread.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/thread/JobThread.java b/xxl-job-core/src/main/java/com/xxl/job/core/thread/JobThread.java index 866670ec..a719ed4f 100644 --- a/xxl-job-core/src/main/java/com/xxl/job/core/thread/JobThread.java +++ b/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) {