修正TriggerParam的LogDateTim为LogDateTime

master
wang_yangbj 5 years ago
parent 59f68132ea
commit 7f969ae12c
  1. 2
      xxl-job-admin/src/main/java/com/xxl/job/admin/core/trigger/XxlJobTrigger.java
  2. 2
      xxl-job-admin/src/test/java/com/xxl/job/executor/ExecutorBizTest.java
  3. 12
      xxl-job-core/src/main/java/com/xxl/job/core/biz/model/TriggerParam.java
  4. 8
      xxl-job-core/src/main/java/com/xxl/job/core/thread/JobThread.java
  5. 2
      xxl-job-core/src/test/java/com/xxl/job/core/biz/impl/ExecutorBizImplTest.java

@ -116,7 +116,7 @@ public class XxlJobTrigger {
triggerParam.setExecutorBlockStrategy(jobInfo.getExecutorBlockStrategy());
triggerParam.setExecutorTimeout(jobInfo.getExecutorTimeout());
triggerParam.setLogId(jobLog.getId());
triggerParam.setLogDateTim(jobLog.getTriggerTime().getTime());
triggerParam.setLogDateTime(jobLog.getTriggerTime().getTime());
triggerParam.setGlueType(jobInfo.getGlueType());
triggerParam.setGlueSource(jobInfo.getGlueSource());
triggerParam.setGlueUpdatetime(jobInfo.getGlueUpdatetime().getTime());

@ -45,7 +45,7 @@ public class ExecutorBizTest {
triggerParam.setGlueSource(null);
triggerParam.setGlueUpdatetime(System.currentTimeMillis());
triggerParam.setLogId(1);
triggerParam.setLogDateTim(System.currentTimeMillis());
triggerParam.setLogDateTime(System.currentTimeMillis());
// do remote trigger
String accessToken = null;

@ -16,7 +16,7 @@ public class TriggerParam implements Serializable{
private int executorTimeout;
private long logId;
private long logDateTim;
private long logDateTime;
private String glueType;
private String glueSource;
@ -74,12 +74,12 @@ public class TriggerParam implements Serializable{
this.logId = logId;
}
public long getLogDateTim() {
return logDateTim;
public long getLogDateTime() {
return logDateTime;
}
public void setLogDateTim(long logDateTim) {
this.logDateTim = logDateTim;
public void setLogDateTime(long logDateTime) {
this.logDateTime = logDateTime;
}
public String getGlueType() {
@ -132,7 +132,7 @@ public class TriggerParam implements Serializable{
", executorBlockStrategy='" + executorBlockStrategy + '\'' +
", executorTimeout=" + executorTimeout +
", logId=" + logId +
", logDateTim=" + logDateTim +
", logDateTime=" + logDateTime +
", glueType='" + glueType + '\'' +
", glueSource='" + glueSource + '\'' +
", glueUpdatetime=" + glueUpdatetime +

@ -116,7 +116,7 @@ public class JobThread extends Thread{
triggerLogIdSet.remove(triggerParam.getLogId());
// log filename, like "logPath/yyyy-MM-dd/9999.log"
String logFileName = XxlJobFileAppender.makeLogFileName(new Date(triggerParam.getLogDateTim()), triggerParam.getLogId());
String logFileName = XxlJobFileAppender.makeLogFileName(new Date(triggerParam.getLogDateTime()), triggerParam.getLogId());
XxlJobFileAppender.contextHolder.set(logFileName);
ShardingUtil.setShardingVo(new ShardingUtil.ShardingVO(triggerParam.getBroadcastIndex(), triggerParam.getBroadcastTotal()));
@ -184,11 +184,11 @@ public class JobThread extends Thread{
// callback handler info
if (!toStop) {
// commonm
TriggerCallbackThread.pushCallBack(new HandleCallbackParam(triggerParam.getLogId(), triggerParam.getLogDateTim(), executeResult));
TriggerCallbackThread.pushCallBack(new HandleCallbackParam(triggerParam.getLogId(), triggerParam.getLogDateTime(), executeResult));
} else {
// is killed
ReturnT<String> stopResult = new ReturnT<String>(ReturnT.FAIL_CODE, stopReason + " [job running,killed]");
TriggerCallbackThread.pushCallBack(new HandleCallbackParam(triggerParam.getLogId(), triggerParam.getLogDateTim(), stopResult));
TriggerCallbackThread.pushCallBack(new HandleCallbackParam(triggerParam.getLogId(), triggerParam.getLogDateTime(), stopResult));
}
}
}
@ -200,7 +200,7 @@ public class JobThread extends Thread{
if (triggerParam!=null) {
// is killed
ReturnT<String> stopResult = new ReturnT<String>(ReturnT.FAIL_CODE, stopReason + " [job not executed, in the job queue, killed.]");
TriggerCallbackThread.pushCallBack(new HandleCallbackParam(triggerParam.getLogId(), triggerParam.getLogDateTim(), stopResult));
TriggerCallbackThread.pushCallBack(new HandleCallbackParam(triggerParam.getLogId(), triggerParam.getLogDateTime(), stopResult));
}
}

@ -131,7 +131,7 @@ public class ExecutorBizImplTest {
triggerParam.setGlueSource(null);
triggerParam.setGlueUpdatetime(System.currentTimeMillis());
triggerParam.setLogId(1);
triggerParam.setLogDateTim(System.currentTimeMillis());
triggerParam.setLogDateTime(System.currentTimeMillis());
// Act
final ReturnT<String> retval = executorBiz.run(triggerParam);

Loading…
Cancel
Save