|
|
@ -40,7 +40,7 @@ public class JobThread extends Thread{
|
|
|
|
|
|
|
|
|
|
|
|
public void pushTriggerQueue(RequestModel requestModel) {
|
|
|
|
public void pushTriggerQueue(RequestModel requestModel) {
|
|
|
|
if (triggerLogIdSet.contains(requestModel.getLogId())) {
|
|
|
|
if (triggerLogIdSet.contains(requestModel.getLogId())) {
|
|
|
|
logger.info("repeate trigger job, logId:{}", requestModel.getLogId());
|
|
|
|
logger.debug("repeate trigger job, logId:{}", requestModel.getLogId());
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -58,8 +58,6 @@ public class JobThread extends Thread{
|
|
|
|
this.stopReason = stopReason;
|
|
|
|
this.stopReason = stopReason;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int i = 1;
|
|
|
|
int i = 1;
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void run() {
|
|
|
|
public void run() {
|
|
|
@ -83,16 +81,16 @@ public class JobThread extends Thread{
|
|
|
|
String logFileName = XxlJobFileAppender.makeLogFileName(new Date(triggerDate.getLogDateTim()), triggerDate.getLogId());
|
|
|
|
String logFileName = XxlJobFileAppender.makeLogFileName(new Date(triggerDate.getLogDateTim()), triggerDate.getLogId());
|
|
|
|
|
|
|
|
|
|
|
|
XxlJobFileAppender.contextHolder.set(logFileName);
|
|
|
|
XxlJobFileAppender.contextHolder.set(logFileName);
|
|
|
|
logger.info("----------- xxl-job job handle start -----------");
|
|
|
|
logger.info("----------- xxl-job job execute start -----------");
|
|
|
|
handler.execute(handlerParams);
|
|
|
|
handler.execute(handlerParams);
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
|
logger.info("JobThread Exception:", e);
|
|
|
|
logger.error("JobThread Exception:", e);
|
|
|
|
_status = ResponseModel.FAIL;
|
|
|
|
_status = ResponseModel.FAIL;
|
|
|
|
StringWriter out = new StringWriter();
|
|
|
|
StringWriter out = new StringWriter();
|
|
|
|
e.printStackTrace(new PrintWriter(out));
|
|
|
|
e.printStackTrace(new PrintWriter(out));
|
|
|
|
_msg = out.toString();
|
|
|
|
_msg = out.toString();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
logger.info("----------- xxl-job job handle end ----------- <br> Look : ExecutorParams:{}, Status:{}, Msg:{}",
|
|
|
|
logger.info("----------- xxl-job job execute end ----------- <br> Look : ExecutorParams:{}, Status:{}, Msg:{}",
|
|
|
|
new Object[]{handlerParams, _status, _msg});
|
|
|
|
new Object[]{handlerParams, _status, _msg});
|
|
|
|
|
|
|
|
|
|
|
|
// callback handler info
|
|
|
|
// callback handler info
|
|
|
@ -109,7 +107,7 @@ public class JobThread extends Thread{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
|
logger.info("JobThread Exception:", e);
|
|
|
|
logger.error("----------- xxl-job JobThread Exception:", e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -124,6 +122,6 @@ public class JobThread extends Thread{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
logger.info(">>>>>>>>>>>> xxl-job handlerThrad stoped, hashCode:{}", Thread.currentThread());
|
|
|
|
logger.info(">>>>>>>>>>>> xxl-job JobThread stoped, hashCode:{}", Thread.currentThread());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|