Java Code Examples for com.xxl.job.admin.core.model.XxlJobLog#setHandleTime()

The following examples show how to use com.xxl.job.admin.core.model.XxlJobLog#setHandleTime() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JobLogController.java    From open-capacity-platform with Apache License 2.0 5 votes vote down vote up
@RequestMapping("/logKill")
@ResponseBody
public ReturnT<String> logKill(int id){
	// base check
	XxlJobLog log = xxlJobLogDao.load(id);
	XxlJobInfo jobInfo = xxlJobInfoDao.loadById(log.getJobId());
	if (jobInfo==null) {
		return new ReturnT<String>(500, I18nUtil.getString("jobinfo_glue_jobid_unvalid"));
	}
	if (ReturnT.SUCCESS_CODE != log.getTriggerCode()) {
		return new ReturnT<String>(500, I18nUtil.getString("joblog_kill_log_limit"));
	}

	// request of kill
	ReturnT<String> runResult = null;
	try {
		ExecutorBiz executorBiz = XxlJobDynamicScheduler.getExecutorBiz(log.getExecutorAddress());
		runResult = executorBiz.kill(jobInfo.getId());
	} catch (Exception e) {
		logger.error(e.getMessage(), e);
		runResult = new ReturnT<String>(500, e.getMessage());
	}

	if (ReturnT.SUCCESS_CODE == runResult.getCode()) {
		log.setHandleCode(ReturnT.FAIL_CODE);
		log.setHandleMsg( I18nUtil.getString("joblog_kill_log_byman")+":" + (runResult.getMsg()!=null?runResult.getMsg():""));
		log.setHandleTime(new Date());
		xxlJobLogDao.updateHandleInfo(log);
		return new ReturnT<String>(runResult.getMsg());
	} else {
		return new ReturnT<String>(500, runResult.getMsg());
	}
}
 
Example 2
Source File: JobLogController.java    From microservices-platform with Apache License 2.0 5 votes vote down vote up
@RequestMapping("/logKill")
@ResponseBody
public ReturnT<String> logKill(int id){
	// base check
	XxlJobLog log = xxlJobLogDao.load(id);
	XxlJobInfo jobInfo = xxlJobInfoDao.loadById(log.getJobId());
	if (jobInfo==null) {
		return new ReturnT<String>(500, I18nUtil.getString("jobinfo_glue_jobid_unvalid"));
	}
	if (ReturnT.SUCCESS_CODE != log.getTriggerCode()) {
		return new ReturnT<String>(500, I18nUtil.getString("joblog_kill_log_limit"));
	}

	// request of kill
	ReturnT<String> runResult = null;
	try {
		ExecutorBiz executorBiz = XxlJobDynamicScheduler.getExecutorBiz(log.getExecutorAddress());
		runResult = executorBiz.kill(jobInfo.getId());
	} catch (Exception e) {
		logger.error(e.getMessage(), e);
		runResult = new ReturnT<String>(500, e.getMessage());
	}

	if (ReturnT.SUCCESS_CODE == runResult.getCode()) {
		log.setHandleCode(ReturnT.FAIL_CODE);
		log.setHandleMsg( I18nUtil.getString("joblog_kill_log_byman")+":" + (runResult.getMsg()!=null?runResult.getMsg():""));
		log.setHandleTime(new Date());
		xxlJobLogDao.updateHandleInfo(log);
		return new ReturnT<String>(runResult.getMsg());
	} else {
		return new ReturnT<String>(500, runResult.getMsg());
	}
}
 
Example 3
Source File: XxlJobLogDaoTest.java    From microservices-platform with Apache License 2.0 5 votes vote down vote up
@Test
public void test(){
    List<XxlJobLog> list = xxlJobLogDao.pageList(0, 10, 1, 1, null, null, 1);
    int list_count = xxlJobLogDao.pageListCount(0, 10, 1, 1, null, null, 1);

    XxlJobLog log = new XxlJobLog();
    log.setJobGroup(1);
    log.setJobId(1);

    int ret1 = xxlJobLogDao.save(log);
    XxlJobLog dto = xxlJobLogDao.load(log.getId());

    log.setTriggerTime(new Date());
    log.setTriggerCode(1);
    log.setTriggerMsg("1");
    log.setExecutorAddress("1");
    log.setExecutorHandler("1");
    log.setExecutorParam("1");
    ret1 = xxlJobLogDao.updateTriggerInfo(log);
    dto = xxlJobLogDao.load(log.getId());


    log.setHandleTime(new Date());
    log.setHandleCode(2);
    log.setHandleMsg("2");
    ret1 = xxlJobLogDao.updateHandleInfo(log);
    dto = xxlJobLogDao.load(log.getId());


    List<Map<String, Object>> list2 = xxlJobLogDao.triggerCountByDay(DateUtils.addDays(new Date(), 30), new Date());

    int ret4 = xxlJobLogDao.clearLog(1, 1, new Date(), 100);

    int ret2 = xxlJobLogDao.delete(log.getJobId());

    int ret3 = xxlJobLogDao.triggerCountByHandleCode(-1);
}
 
Example 4
Source File: JobLogController.java    From zuihou-admin-boot with Apache License 2.0 5 votes vote down vote up
@RequestMapping("/logKill")
@ResponseBody
public ReturnT<String> logKill(Integer id) {
    // base check
    XxlJobLog log = xxlJobLogDao.load(id);
    XxlJobInfo jobInfo = xxlJobInfoDao.loadById(log.getJobId());
    if (jobInfo == null) {
        return new ReturnT<String>(500, I18nUtil.getString("jobinfo_glue_jobid_unvalid"));
    }
    if (ReturnT.SUCCESS_CODE != log.getTriggerCode()) {
        return new ReturnT<String>(500, I18nUtil.getString("joblog_kill_log_limit"));
    }

    // request of kill
    ReturnT<String> runResult = null;
    try {
        ExecutorBiz executorBiz = XxlJobDynamicScheduler.getExecutorBiz(log.getExecutorAddress());
        runResult = executorBiz.kill(jobInfo.getId());
    } catch (Exception e) {
        logger.error(e.getMessage(), e);
        runResult = new ReturnT<String>(500, e.getMessage());
    }

    if (ReturnT.SUCCESS_CODE == runResult.getCode()) {
        log.setHandleCode(ReturnT.FAIL_CODE);
        log.setHandleMsg(I18nUtil.getString("joblog_kill_log_byman") + ":" + (runResult.getMsg() != null ? runResult.getMsg() : ""));
        log.setHandleTime(new Date());
        xxlJobLogDao.updateHandleInfo(log);
        return new ReturnT<String>(runResult.getMsg());
    } else {
        return new ReturnT<String>(500, runResult.getMsg());
    }
}
 
Example 5
Source File: JobLogController.java    From zuihou-admin-cloud with Apache License 2.0 5 votes vote down vote up
@RequestMapping("/logKill")
@ResponseBody
public ReturnT<String> logKill(Integer id) {
    // base check
    XxlJobLog log = xxlJobLogDao.load(id);
    XxlJobInfo jobInfo = xxlJobInfoDao.loadById(log.getJobId());
    if (jobInfo == null) {
        return new ReturnT<String>(500, I18nUtil.getString("jobinfo_glue_jobid_unvalid"));
    }
    if (ReturnT.SUCCESS_CODE != log.getTriggerCode()) {
        return new ReturnT<String>(500, I18nUtil.getString("joblog_kill_log_limit"));
    }

    // request of kill
    ReturnT<String> runResult = null;
    try {
        ExecutorBiz executorBiz = XxlJobDynamicScheduler.getExecutorBiz(log.getExecutorAddress());
        runResult = executorBiz.kill(jobInfo.getId());
    } catch (Exception e) {
        logger.error(e.getMessage(), e);
        runResult = new ReturnT<String>(500, e.getMessage());
    }

    if (ReturnT.SUCCESS_CODE == runResult.getCode()) {
        log.setHandleCode(ReturnT.FAIL_CODE);
        log.setHandleMsg(I18nUtil.getString("joblog_kill_log_byman") + ":" + (runResult.getMsg() != null ? runResult.getMsg() : ""));
        log.setHandleTime(new Date());
        xxlJobLogDao.updateHandleInfo(log);
        return new ReturnT<String>(runResult.getMsg());
    } else {
        return new ReturnT<String>(500, runResult.getMsg());
    }
}
 
Example 6
Source File: JobLogController.java    From xxl-job with GNU General Public License v3.0 5 votes vote down vote up
@RequestMapping("/logKill")
@ResponseBody
public ReturnT<String> logKill(int id){
	// base check
	XxlJobLog log = xxlJobLogDao.load(id);
	XxlJobInfo jobInfo = xxlJobInfoDao.loadById(log.getJobId());
	if (jobInfo==null) {
		return new ReturnT<String>(500, I18nUtil.getString("jobinfo_glue_jobid_unvalid"));
	}
	if (ReturnT.SUCCESS_CODE != log.getTriggerCode()) {
		return new ReturnT<String>(500, I18nUtil.getString("joblog_kill_log_limit"));
	}

	// request of kill
	ReturnT<String> runResult = null;
	try {
		ExecutorBiz executorBiz = XxlJobScheduler.getExecutorBiz(log.getExecutorAddress());
		runResult = executorBiz.kill(new KillParam(jobInfo.getId()));
	} catch (Exception e) {
		logger.error(e.getMessage(), e);
		runResult = new ReturnT<String>(500, e.getMessage());
	}

	if (ReturnT.SUCCESS_CODE == runResult.getCode()) {
		log.setHandleCode(ReturnT.FAIL_CODE);
		log.setHandleMsg( I18nUtil.getString("joblog_kill_log_byman")+":" + (runResult.getMsg()!=null?runResult.getMsg():""));
		log.setHandleTime(new Date());
		xxlJobLogDao.updateHandleInfo(log);
		return new ReturnT<String>(runResult.getMsg());
	} else {
		return new ReturnT<String>(500, runResult.getMsg());
	}
}
 
Example 7
Source File: XxlJobLogDaoTest.java    From xxl-job with GNU General Public License v3.0 5 votes vote down vote up
@Test
public void test(){
    List<XxlJobLog> list = xxlJobLogDao.pageList(0, 10, 1, 1, null, null, 1);
    int list_count = xxlJobLogDao.pageListCount(0, 10, 1, 1, null, null, 1);

    XxlJobLog log = new XxlJobLog();
    log.setJobGroup(1);
    log.setJobId(1);

    long ret1 = xxlJobLogDao.save(log);
    XxlJobLog dto = xxlJobLogDao.load(log.getId());

    log.setTriggerTime(new Date());
    log.setTriggerCode(1);
    log.setTriggerMsg("1");
    log.setExecutorAddress("1");
    log.setExecutorHandler("1");
    log.setExecutorParam("1");
    ret1 = xxlJobLogDao.updateTriggerInfo(log);
    dto = xxlJobLogDao.load(log.getId());


    log.setHandleTime(new Date());
    log.setHandleCode(2);
    log.setHandleMsg("2");
    ret1 = xxlJobLogDao.updateHandleInfo(log);
    dto = xxlJobLogDao.load(log.getId());


    List<Long> ret4 = xxlJobLogDao.findClearLogIds(1, 1, new Date(), 100, 100);

    int ret2 = xxlJobLogDao.delete(log.getJobId());

}
 
Example 8
Source File: AdminBizImpl.java    From open-capacity-platform with Apache License 2.0 4 votes vote down vote up
private ReturnT<String> callback(HandleCallbackParam handleCallbackParam) {
    // valid log item
    XxlJobLog log = xxlJobLogDao.load(handleCallbackParam.getLogId());
    if (log == null) {
        return new ReturnT<String>(ReturnT.FAIL_CODE, "log item not found.");
    }
    if (log.getHandleCode() > 0) {
        return new ReturnT<String>(ReturnT.FAIL_CODE, "log repeate callback.");     // avoid repeat callback, trigger child job etc
    }

    // trigger success, to trigger child job
    String callbackMsg = null;
    if (IJobHandler.SUCCESS.getCode() == handleCallbackParam.getExecuteResult().getCode()) {
        XxlJobInfo xxlJobInfo = xxlJobInfoDao.loadById(log.getJobId());
        if (xxlJobInfo!=null && StringUtils.isNotBlank(xxlJobInfo.getChildJobId())) {
            callbackMsg = "<br><br><span style=\"color:#00c0ef;\" > >>>>>>>>>>>"+ I18nUtil.getString("jobconf_trigger_child_run") +"<<<<<<<<<<< </span><br>";

            String[] childJobIds = xxlJobInfo.getChildJobId().split(",");
            for (int i = 0; i < childJobIds.length; i++) {
                int childJobId = (StringUtils.isNotBlank(childJobIds[i]) && StringUtils.isNumeric(childJobIds[i]))?Integer.valueOf(childJobIds[i]):-1;
                if (childJobId > 0) {
                    ReturnT<String> triggerChildResult = xxlJobService.triggerJob(childJobId);

                    // add msg
                    callbackMsg += MessageFormat.format(I18nUtil.getString("jobconf_callback_child_msg1"),
                            (i+1),
                            childJobIds.length,
                            childJobIds[i],
                            (triggerChildResult.getCode()==ReturnT.SUCCESS_CODE?I18nUtil.getString("system_success"):I18nUtil.getString("system_fail")),
                            triggerChildResult.getMsg());
                } else {
                    callbackMsg += MessageFormat.format(I18nUtil.getString("jobconf_callback_child_msg2"),
                            (i+1),
                            childJobIds.length,
                            childJobIds[i]);
                }
            }

        }
    } else if (IJobHandler.FAIL_RETRY.getCode() == handleCallbackParam.getExecuteResult().getCode()){
        ReturnT<String> retryTriggerResult = xxlJobService.triggerJob(log.getJobId());
        callbackMsg = "<br><br><span style=\"color:#F39C12;\" > >>>>>>>>>>>"+ I18nUtil.getString("jobconf_exe_fail_retry") +"<<<<<<<<<<< </span><br>";

        callbackMsg += MessageFormat.format(I18nUtil.getString("jobconf_callback_msg1"),
               (retryTriggerResult.getCode()==ReturnT.SUCCESS_CODE?I18nUtil.getString("system_success"):I18nUtil.getString("system_fail")), retryTriggerResult.getMsg());
    }

    // handle msg
    StringBuffer handleMsg = new StringBuffer();
    if (log.getHandleMsg()!=null) {
        handleMsg.append(log.getHandleMsg()).append("<br>");
    }
    if (handleCallbackParam.getExecuteResult().getMsg() != null) {
        handleMsg.append(handleCallbackParam.getExecuteResult().getMsg());
    }
    if (callbackMsg != null) {
        handleMsg.append(callbackMsg);
    }

    // success, save log
    log.setHandleTime(new Date());
    log.setHandleCode(handleCallbackParam.getExecuteResult().getCode());
    log.setHandleMsg(handleMsg.toString());
    xxlJobLogDao.updateHandleInfo(log);

    return ReturnT.SUCCESS;
}
 
Example 9
Source File: AdminBizImpl.java    From microservices-platform with Apache License 2.0 4 votes vote down vote up
private ReturnT<String> callback(HandleCallbackParam handleCallbackParam) {
    // valid log item
    XxlJobLog log = xxlJobLogDao.load(handleCallbackParam.getLogId());
    if (log == null) {
        return new ReturnT<String>(ReturnT.FAIL_CODE, "log item not found.");
    }
    if (log.getHandleCode() > 0) {
        return new ReturnT<String>(ReturnT.FAIL_CODE, "log repeate callback.");     // avoid repeat callback, trigger child job etc
    }

    // trigger success, to trigger child job
    String callbackMsg = null;
    if (IJobHandler.SUCCESS.getCode() == handleCallbackParam.getExecuteResult().getCode()) {
        XxlJobInfo xxlJobInfo = xxlJobInfoDao.loadById(log.getJobId());
        if (xxlJobInfo!=null && StringUtils.isNotBlank(xxlJobInfo.getChildJobId())) {
            callbackMsg = "<br><br><span style=\"color:#00c0ef;\" > >>>>>>>>>>>"+ I18nUtil.getString("jobconf_trigger_child_run") +"<<<<<<<<<<< </span><br>";

            String[] childJobIds = xxlJobInfo.getChildJobId().split(",");
            for (int i = 0; i < childJobIds.length; i++) {
                int childJobId = (StringUtils.isNotBlank(childJobIds[i]) && StringUtils.isNumeric(childJobIds[i]))?Integer.valueOf(childJobIds[i]):-1;
                if (childJobId > 0) {

                    JobTriggerPoolHelper.trigger(childJobId, TriggerTypeEnum.PARENT, -1, null, null);
                    ReturnT<String> triggerChildResult = ReturnT.SUCCESS;

                    // add msg
                    callbackMsg += MessageFormat.format(I18nUtil.getString("jobconf_callback_child_msg1"),
                            (i+1),
                            childJobIds.length,
                            childJobIds[i],
                            (triggerChildResult.getCode()==ReturnT.SUCCESS_CODE?I18nUtil.getString("system_success"):I18nUtil.getString("system_fail")),
                            triggerChildResult.getMsg());
                } else {
                    callbackMsg += MessageFormat.format(I18nUtil.getString("jobconf_callback_child_msg2"),
                            (i+1),
                            childJobIds.length,
                            childJobIds[i]);
                }
            }

        }
    }

    // handle msg
    StringBuffer handleMsg = new StringBuffer();
    if (log.getHandleMsg()!=null) {
        handleMsg.append(log.getHandleMsg()).append("<br>");
    }
    if (handleCallbackParam.getExecuteResult().getMsg() != null) {
        handleMsg.append(handleCallbackParam.getExecuteResult().getMsg());
    }
    if (callbackMsg != null) {
        handleMsg.append(callbackMsg);
    }

    // success, save log
    log.setHandleTime(new Date());
    log.setHandleCode(handleCallbackParam.getExecuteResult().getCode());
    log.setHandleMsg(handleMsg.toString());
    xxlJobLogDao.updateHandleInfo(log);

    return ReturnT.SUCCESS;
}
 
Example 10
Source File: AdminBizImpl.java    From zuihou-admin-boot with Apache License 2.0 4 votes vote down vote up
private ReturnT<String> callback(HandleCallbackParam handleCallbackParam) {
    // valid log item
    XxlJobLog log = xxlJobLogDao.load(handleCallbackParam.getLogId());
    if (log == null) {
        return new ReturnT<String>(ReturnT.FAIL_CODE, "log item not found.");
    }
    if (log.getHandleCode() > 0) {
        return new ReturnT<String>(ReturnT.FAIL_CODE, "log repeate callback.");     // avoid repeat callback, trigger child job etc
    }

    // trigger success, to trigger child job
    String callbackMsg = null;
    if (IJobHandler.SUCCESS.getCode() == handleCallbackParam.getExecuteResult().getCode()) {
        XxlJobInfo xxlJobInfo = xxlJobInfoDao.loadById(log.getJobId());
        if (xxlJobInfo != null && StringUtils.isNotBlank(xxlJobInfo.getChildJobId())) {
            callbackMsg = "<br><br><span style=\"color:#00c0ef;\" > >>>>>>>>>>>" + I18nUtil.getString("jobconf_trigger_child_run") + "<<<<<<<<<<< </span><br>";

            String[] childJobIds = xxlJobInfo.getChildJobId().split(",");
            for (int i = 0; i < childJobIds.length; i++) {
                int childJobId = (StringUtils.isNotBlank(childJobIds[i]) && StringUtils.isNumeric(childJobIds[i])) ? Integer.valueOf(childJobIds[i]) : -1;
                if (childJobId > 0) {

                    JobTriggerPoolHelper.trigger(childJobId, TriggerTypeEnum.PARENT, -1, null, null);
                    ReturnT<String> triggerChildResult = ReturnT.SUCCESS;

                    // add msg
                    callbackMsg += MessageFormat.format(I18nUtil.getString("jobconf_callback_child_msg1"),
                            (i + 1),
                            childJobIds.length,
                            childJobIds[i],
                            (triggerChildResult.getCode() == ReturnT.SUCCESS_CODE ? I18nUtil.getString("system_success") : I18nUtil.getString("system_fail")),
                            triggerChildResult.getMsg());
                } else {
                    callbackMsg += MessageFormat.format(I18nUtil.getString("jobconf_callback_child_msg2"),
                            (i + 1),
                            childJobIds.length,
                            childJobIds[i]);
                }
            }

        }
    }

    // handle msg
    StringBuffer handleMsg = new StringBuffer();
    if (log.getHandleMsg() != null) {
        handleMsg.append(log.getHandleMsg()).append("<br>");
    }
    if (handleCallbackParam.getExecuteResult().getMsg() != null) {
        handleMsg.append(handleCallbackParam.getExecuteResult().getMsg());
    }
    if (callbackMsg != null) {
        handleMsg.append(callbackMsg);
    }

    // success, save log
    log.setHandleTime(new Date());
    log.setHandleCode(handleCallbackParam.getExecuteResult().getCode());
    log.setHandleMsg(handleMsg.toString());
    xxlJobLogDao.updateHandleInfo(log);

    return ReturnT.SUCCESS;
}
 
Example 11
Source File: AdminBizImpl.java    From zuihou-admin-cloud with Apache License 2.0 4 votes vote down vote up
private ReturnT<String> callback(HandleCallbackParam handleCallbackParam) {
    // valid log item
    XxlJobLog log = xxlJobLogDao.load(handleCallbackParam.getLogId());
    if (log == null) {
        return new ReturnT<String>(ReturnT.FAIL_CODE, "log item not found.");
    }
    if (log.getHandleCode() > 0) {
        return new ReturnT<String>(ReturnT.FAIL_CODE, "log repeate callback.");     // avoid repeat callback, trigger child job etc
    }

    // trigger success, to trigger child job
    String callbackMsg = null;
    if (IJobHandler.SUCCESS.getCode() == handleCallbackParam.getExecuteResult().getCode()) {
        XxlJobInfo xxlJobInfo = xxlJobInfoDao.loadById(log.getJobId());
        if (xxlJobInfo != null && StringUtils.isNotBlank(xxlJobInfo.getChildJobId())) {
            callbackMsg = "<br><br><span style=\"color:#00c0ef;\" > >>>>>>>>>>>" + I18nUtil.getString("jobconf_trigger_child_run") + "<<<<<<<<<<< </span><br>";

            String[] childJobIds = xxlJobInfo.getChildJobId().split(",");
            for (int i = 0; i < childJobIds.length; i++) {
                int childJobId = (StringUtils.isNotBlank(childJobIds[i]) && StringUtils.isNumeric(childJobIds[i])) ? Integer.valueOf(childJobIds[i]) : -1;
                if (childJobId > 0) {

                    JobTriggerPoolHelper.trigger(childJobId, TriggerTypeEnum.PARENT, -1, null, null);
                    ReturnT<String> triggerChildResult = ReturnT.SUCCESS;

                    // add msg
                    callbackMsg += MessageFormat.format(I18nUtil.getString("jobconf_callback_child_msg1"),
                            (i + 1),
                            childJobIds.length,
                            childJobIds[i],
                            (triggerChildResult.getCode() == ReturnT.SUCCESS_CODE ? I18nUtil.getString("system_success") : I18nUtil.getString("system_fail")),
                            triggerChildResult.getMsg());
                } else {
                    callbackMsg += MessageFormat.format(I18nUtil.getString("jobconf_callback_child_msg2"),
                            (i + 1),
                            childJobIds.length,
                            childJobIds[i]);
                }
            }

        }
    }

    // handle msg
    StringBuffer handleMsg = new StringBuffer();
    if (log.getHandleMsg() != null) {
        handleMsg.append(log.getHandleMsg()).append("<br>");
    }
    if (handleCallbackParam.getExecuteResult().getMsg() != null) {
        handleMsg.append(handleCallbackParam.getExecuteResult().getMsg());
    }
    if (callbackMsg != null) {
        handleMsg.append(callbackMsg);
    }

    // success, save log
    log.setHandleTime(new Date());
    log.setHandleCode(handleCallbackParam.getExecuteResult().getCode());
    log.setHandleMsg(handleMsg.toString());
    xxlJobLogDao.updateHandleInfo(log);

    return ReturnT.SUCCESS;
}
 
Example 12
Source File: AdminBizImpl.java    From xxl-job with GNU General Public License v3.0 4 votes vote down vote up
private ReturnT<String> callback(HandleCallbackParam handleCallbackParam) {
    // valid log item
    XxlJobLog log = xxlJobLogDao.load(handleCallbackParam.getLogId());
    if (log == null) {
        return new ReturnT<String>(ReturnT.FAIL_CODE, "log item not found.");
    }
    if (log.getHandleCode() > 0) {
        return new ReturnT<String>(ReturnT.FAIL_CODE, "log repeate callback.");     // avoid repeat callback, trigger child job etc
    }

    // trigger success, to trigger child job
    String callbackMsg = null;
    if (IJobHandler.SUCCESS.getCode() == handleCallbackParam.getExecuteResult().getCode()) {
        XxlJobInfo xxlJobInfo = xxlJobInfoDao.loadById(log.getJobId());
        if (xxlJobInfo!=null && xxlJobInfo.getChildJobId()!=null && xxlJobInfo.getChildJobId().trim().length()>0) {
            callbackMsg = "<br><br><span style=\"color:#00c0ef;\" > >>>>>>>>>>>"+ I18nUtil.getString("jobconf_trigger_child_run") +"<<<<<<<<<<< </span><br>";

            String[] childJobIds = xxlJobInfo.getChildJobId().split(",");
            for (int i = 0; i < childJobIds.length; i++) {
                int childJobId = (childJobIds[i]!=null && childJobIds[i].trim().length()>0 && isNumeric(childJobIds[i]))?Integer.valueOf(childJobIds[i]):-1;
                if (childJobId > 0) {

                    JobTriggerPoolHelper.trigger(childJobId, TriggerTypeEnum.PARENT, -1, null, null, null);
                    ReturnT<String> triggerChildResult = ReturnT.SUCCESS;

                    // add msg
                    callbackMsg += MessageFormat.format(I18nUtil.getString("jobconf_callback_child_msg1"),
                            (i+1),
                            childJobIds.length,
                            childJobIds[i],
                            (triggerChildResult.getCode()==ReturnT.SUCCESS_CODE?I18nUtil.getString("system_success"):I18nUtil.getString("system_fail")),
                            triggerChildResult.getMsg());
                } else {
                    callbackMsg += MessageFormat.format(I18nUtil.getString("jobconf_callback_child_msg2"),
                            (i+1),
                            childJobIds.length,
                            childJobIds[i]);
                }
            }

        }
    }

    // handle msg
    StringBuffer handleMsg = new StringBuffer();
    if (log.getHandleMsg()!=null) {
        handleMsg.append(log.getHandleMsg()).append("<br>");
    }
    if (handleCallbackParam.getExecuteResult().getMsg() != null) {
        handleMsg.append(handleCallbackParam.getExecuteResult().getMsg());
    }
    if (callbackMsg != null) {
        handleMsg.append(callbackMsg);
    }

    if (handleMsg.length() > 15000) {
        handleMsg = new StringBuffer(handleMsg.substring(0, 15000));  // text最大64kb 避免长度过长
    }

    // success, save log
    log.setHandleTime(new Date());
    log.setHandleCode(handleCallbackParam.getExecuteResult().getCode());
    log.setHandleMsg(handleMsg.toString());
    xxlJobLogDao.updateHandleInfo(log);

    return ReturnT.SUCCESS;
}