Commit 7593c888 by huangfusuper

日志保存结果规范化

parent 47a3f51f
package com.byit.task;
import com.byit.conf.MythJobAutoConfigure;
import com.byit.enums.EmailEnum;
import com.byit.enums.NodePropertyEnum;
import com.byit.enums.NodeRunStatusPropertyEnum;
import com.byit.job.dto.DispatchResponseDto;
import com.byit.job.dto.ScriptDto;
import com.byit.job.enums.JobResultEnum;
......@@ -59,8 +61,8 @@ public class ScriptExecutorJobTask implements TimerTask {
/**
* 校验工作流是否被杀死
* @param flowId
* @param runId
* @param flowId 工作流ID
* @param runId 运行标识
* @return
*/
private boolean checkFlowStatusIsKill(Integer flowId,String runId){
......@@ -74,7 +76,7 @@ public class ScriptExecutorJobTask implements TimerTask {
/**
* 运行任务
* @param mythJobTaskSchedule
* @param mythJobTaskSchedule 运行的排期表
*/
private void runJob(JobTaskSchedule mythJobTaskSchedule) {
RunScriptService runScriptService = SpringUtil.getBean(RunScriptService.class);
......@@ -121,7 +123,7 @@ public class ScriptExecutorJobTask implements TimerTask {
jobTaskRunLog.setLogId(mythJobTaskSchedule.getLogId());
jobTaskRunLog.setVersionName(mythJobTaskSchedule.getVersionName());
jobTaskRunLog.setRunType("2");
jobTaskRunLog.setRunType("1");
jobTaskRunLog.setJobType(mythJobTaskSchedule.getJobType());
jobTaskRunLog.setHandlerName(mythJobTaskSchedule.getHandlerName());
jobTaskRunLog.setTriggerTime(new Date());
......@@ -131,8 +133,8 @@ public class ScriptExecutorJobTask implements TimerTask {
Date thisTime = new Date();
jobTaskRunLog.setStartTime(thisTime);
jobTaskRunLog.setEndTime(thisTime);
jobTaskRunLog.setRunCode("2");
jobTaskRunLog.setAlertEnd("1");
jobTaskRunLog.setRunCode(NodeRunStatusPropertyEnum.RUN_FAILURE.getCode());
jobTaskRunLog.setAlertEnd(EmailEnum.IS_ALARM_NO.getCode());
if (jobTaskRunLogById.getRunCount()>1) {
//上一次的执行日志
String runMsg = jobTaskRunLogById.getRunMsg();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment