|
|
|
@ -39,7 +39,7 @@ public abstract class TaskBaseService implements TaskHandler {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void runTask() {
|
|
|
|
|
while (true) {
|
|
|
|
|
// while (true) {
|
|
|
|
|
try {
|
|
|
|
|
setLogId();
|
|
|
|
|
if (isPoolFull()) {
|
|
|
|
@ -52,18 +52,18 @@ public abstract class TaskBaseService implements TaskHandler {
|
|
|
|
|
log.error("任务异常退出, 任务池 " + getTaskExecutorName(), e);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(!isCirculate()){
|
|
|
|
|
log.info("任务不循环,退出");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
Thread.sleep(getIntervalTimeSecond());
|
|
|
|
|
} catch (Throwable e) {
|
|
|
|
|
log.error("循环间隔异常");
|
|
|
|
|
}
|
|
|
|
|
log.info("进入下一次循环");
|
|
|
|
|
}
|
|
|
|
|
// if(!isCirculate()){
|
|
|
|
|
// log.info("任务不循环,退出");
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// try {
|
|
|
|
|
// Thread.sleep(getIntervalTimeSecond());
|
|
|
|
|
// } catch (Throwable e) {
|
|
|
|
|
// log.error("循环间隔异常");
|
|
|
|
|
// }
|
|
|
|
|
// log.info("进入下一次循环");
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void setLogId() {
|
|
|
|
|