Commit 582185bb by huangfusuper

解决重跑报错的BUG

parent 90347d63
......@@ -529,6 +529,10 @@ public class ApiFlowServiceImpl implements ApiFlowService {
//6453
RunRecording runRecording = runRecordingMapper.findRunRecordingByFlowIdAndRunId(flow.getFlowId(), runInfo.getRunId());
ValidationUtil.dataNotNull(runRecording, "查无此运行记录");
if (!ScheduleTypeEnum.NORMAL.getCode().equals(runRecording.getScheduleType())) {
String matchScheduleType = ScheduleTypeEnum.matchScheduleType(runRecording.getScheduleType());
ValidationUtil.isTrueValidation(true,String.format("%s类型的实例,不允许进行重跑操作!", matchScheduleType));
}
//TODO 这里应该查询的是版本表 与版本号挂钩
//NodeVersion nodeVersion = nodeVersionMapper.findNodeByNodeNameAndVersionNameAndFlowId(runInfo.getNodeName(), runRecording.getFlowVersionName(), runRecording.getFlowId());
JobTaskRunLogWithBLOBs byRunIdAndFlowAndNode = jobTaskRunLogMapper.findByRunIdAndFlowAndNode(runRecording.getRunId(), runRecording.getFlowName(), runInfo.getNodeName());
......
......@@ -6,6 +6,7 @@ import com.byit.enums.TransferResultEnum;
import com.byit.exception.DataValidationException;
import com.byit.job.exceptions.IException;
import com.byit.job.utils.MythLogUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
......@@ -16,6 +17,7 @@ import org.springframework.web.bind.annotation.RestControllerAdvice;
* @date: 2019/12/25 16:02
**/
@RestControllerAdvice
@Slf4j
public class ExceptionHandle {
/**
* 全局异常捕捉
......@@ -30,7 +32,8 @@ public class ExceptionHandle {
}else if(e instanceof DataValidationException){
return ResponseResult.error(TransferResultEnum.ERROR.getCode(), e.getMessage());
}
return ResponseResult.error(MythLogUtils.getMessage(e));
log.error(MythLogUtils.getMessage(e));
return ResponseResult.error("调度中心走神了,请稍后再试~~!");
}
/**
......
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