Merge pull request #1070 from wybrono/wy-triggerparam-logdatetime

修正TriggerParam的LogDateTim为LogDateTime
2.1.2
许雪里 5 years ago committed by GitHub
commit 5c74f51408
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

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

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

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

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

Loading…
Cancel
Save