fix: 제작, 발송 대상이 없을 경우 fail로 처리되어 isSuccess 로직 변경

dev
kjh 12 months ago
parent 5f792f10e7
commit 22d777b471

@ -41,7 +41,7 @@ public class SndngMakeTasklet implements Tasklet {
@JobScope
public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) {
final String isSlackEnabled = contribution.getStepExecution().getJobParameters().getString("isSlackEnabled");
boolean isSuccess = false;
boolean isSuccess = true;
final String SNDNG_PROCESS_STTUS = "sndngProcessSttus";
final String UNITY_SNDNG_MST_ID = "unitySndngMastrId";
@ -80,9 +80,10 @@ public class SndngMakeTasklet implements Tasklet {
}
service.make(dto);
isSuccess = true;
}catch(Exception e){
isSuccess = false;
String errMsg = ErrorParse.extractError(e).getMessage();
log.error("SndngMakeTasklet error :: {}", e.getMessage());
MDC.put("service_error_msg", errMsg);

@ -40,7 +40,7 @@ public class SndngSendBulksTasklet implements Tasklet {
@JobScope
public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) {
final String isSlackEnabled = contribution.getStepExecution().getJobParameters().getString("isSlackEnabled");
boolean isSuccess = false;
boolean isSuccess = true;
try {
MDC.put("request_trace_batch_id", UUID.randomUUID().toString().replace("-", ""));
@ -62,8 +62,9 @@ public class SndngSendBulksTasklet implements Tasklet {
dto.setSndngProcessSttus(contribution.getStepExecution().getJobParameters()
.getString("sndngProcessSttus"));
service.sendBulks(dto);
isSuccess = true;
} catch (Exception e) {
isSuccess = false;
String errMsg = ErrorParse.extractError(e).getMessage();
log.error("SndngSendBulksTasklet error :: {}", e.getMessage());
MDC.put("service_error_msg", errMsg);

Loading…
Cancel
Save