|
|
@ -1,7 +1,7 @@ |
|
|
|
package com.xxl.job.admin.core.thread; |
|
|
|
package com.xxl.job.admin.core.thread; |
|
|
|
|
|
|
|
|
|
|
|
import com.xxl.job.admin.core.conf.XxlJobAdminConfig; |
|
|
|
import com.xxl.job.admin.core.conf.XxlJobAdminConfig; |
|
|
|
import com.xxl.job.admin.core.handle.XxlJobPostHandleHelper; |
|
|
|
import com.xxl.job.admin.core.complete.XxlJobCompleter; |
|
|
|
import com.xxl.job.admin.core.model.XxlJobLog; |
|
|
|
import com.xxl.job.admin.core.model.XxlJobLog; |
|
|
|
import com.xxl.job.admin.core.util.I18nUtil; |
|
|
|
import com.xxl.job.admin.core.util.I18nUtil; |
|
|
|
import com.xxl.job.core.biz.model.HandleCallbackParam; |
|
|
|
import com.xxl.job.core.biz.model.HandleCallbackParam; |
|
|
@ -20,11 +20,11 @@ import java.util.concurrent.*; |
|
|
|
* |
|
|
|
* |
|
|
|
* @author xuxueli 2015-9-1 18:05:56 |
|
|
|
* @author xuxueli 2015-9-1 18:05:56 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public class JobLogHelper { |
|
|
|
public class JobCompleteHelper { |
|
|
|
private static Logger logger = LoggerFactory.getLogger(JobLogHelper.class); |
|
|
|
private static Logger logger = LoggerFactory.getLogger(JobCompleteHelper.class); |
|
|
|
|
|
|
|
|
|
|
|
private static JobLogHelper instance = new JobLogHelper(); |
|
|
|
private static JobCompleteHelper instance = new JobCompleteHelper(); |
|
|
|
public static JobLogHelper getInstance(){ |
|
|
|
public static JobCompleteHelper getInstance(){ |
|
|
|
return instance; |
|
|
|
return instance; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -89,7 +89,7 @@ public class JobLogHelper { |
|
|
|
jobLog.setHandleCode(ReturnT.FAIL_CODE); |
|
|
|
jobLog.setHandleCode(ReturnT.FAIL_CODE); |
|
|
|
jobLog.setHandleMsg( I18nUtil.getString("joblog_lost_fail") ); |
|
|
|
jobLog.setHandleMsg( I18nUtil.getString("joblog_lost_fail") ); |
|
|
|
|
|
|
|
|
|
|
|
XxlJobPostHandleHelper.updateHandleInfoAndFinish(jobLog); |
|
|
|
XxlJobCompleter.updateHandleInfoAndFinish(jobLog); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
@ -175,7 +175,7 @@ public class JobLogHelper { |
|
|
|
log.setHandleTime(new Date()); |
|
|
|
log.setHandleTime(new Date()); |
|
|
|
log.setHandleCode(handleCallbackParam.getExecuteResult().getCode()); |
|
|
|
log.setHandleCode(handleCallbackParam.getExecuteResult().getCode()); |
|
|
|
log.setHandleMsg(handleMsg.toString()); |
|
|
|
log.setHandleMsg(handleMsg.toString()); |
|
|
|
XxlJobPostHandleHelper.updateHandleInfoAndFinish(log); |
|
|
|
XxlJobCompleter.updateHandleInfoAndFinish(log); |
|
|
|
|
|
|
|
|
|
|
|
return ReturnT.SUCCESS; |
|
|
|
return ReturnT.SUCCESS; |
|
|
|
} |
|
|
|
} |