-
카테고리
-
세부 분야
백엔드
-
해결 여부
해결됨
job execution에 stopped status가 안나타납니다.
23.03.06 13:40 작성 조회수 305
0
안녕하세요 정수원 선생님
현재 Part.4.3.1.3.3 branch에서 mysql db로 실행시켰을때
step execution 에서 step1,step2 의 batch status는 각각 completed 이고
exit code는 각각 Failed , Pass인 상태입니다.
하지만 job execution에는 status , exitcode 둘다 모두 failed 인상태입니다.
왜 job execution이 stopped로 안나타는지 알 수 있을까요?
addDanglingEndStates 에서 끝나는 시점에 transitions에 2개가 추가 되어서 그런것일까요?
4를 타야할 것같은데 뭔가 5를 타는것같습니다.
5,6은 StepState:name=[batchJob.step1] 시점에서 !hasFail 분기를 타고 추가된것입니다.
답변을 작성해보세요.
1
정수원
지식공유자2023.03.07
네
소스에서 오타가 난 것 같습니다.
public ExitStatus afterStep(StepExecution stepExecution) {
String exitCode = stepExecution.getExitStatus().getExitCode();
if (!exitCode.equals(ExitStatus.FAILED.getExitCode())) {
return new ExitStatus("PASS ");
} else {
return null;
}
}
위에서 PASS 다음에 공백이 하나 더 들어가는 바람에 STOPPED 상태를 건너뛰었습니다.
"PASS" 라고 하면 다음과 같이 잘 나오고 있습니다.
답변 1