fix(shipdetail): 기간 설정 재수집 시 RECOLLECT 모드 분기 오류 수정 #78
@ -28,7 +28,8 @@ import java.util.stream.Collectors;
|
||||
/**
|
||||
* 선박제원정보 변경 IMO 목록 조회 Tasklet.
|
||||
* NORMAL 모드: Maritime API에서 변경된 IMO 번호 조회
|
||||
* RECOLLECT 모드: DB에서 실패 IMO 번호 조회
|
||||
* RECOLLECT + 실패건 재수집(AUTO_RETRY/MANUAL_RETRY): DB에서 실패 IMO 번호 조회
|
||||
* RECOLLECT + 기간 재수집(MANUAL 등): Maritime API에서 설정된 기간의 IMO 번호 조회
|
||||
* 조회 결과를 JobExecutionContext에 저장하여 Partitioner가 사용할 수 있게 함.
|
||||
*/
|
||||
@Slf4j
|
||||
@ -64,11 +65,17 @@ public class ShipDetailImoFetchTasklet implements Tasklet {
|
||||
String executionMode = jobExecution.getJobParameters()
|
||||
.getString("executionMode", "NORMAL");
|
||||
|
||||
String executor = jobExecution.getJobParameters().getString("executor", "");
|
||||
boolean isFailedRecordRetry = "AUTO_RETRY".equals(executor) || "MANUAL_RETRY".equals(executor);
|
||||
|
||||
List<String> imoNumbers;
|
||||
|
||||
if ("RECOLLECT".equals(executionMode)) {
|
||||
if ("RECOLLECT".equals(executionMode) && isFailedRecordRetry) {
|
||||
// 실패건 재수집: DB에서 실패 IMO 조회
|
||||
imoNumbers = fetchRecollectImoNumbers(jobExecution);
|
||||
} else {
|
||||
// NORMAL 모드 또는 기간 재수집: Maritime API에서 IMO 조회
|
||||
// BatchDateService가 executionMode에 따라 적절한 날짜 범위를 결정
|
||||
imoNumbers = fetchChangedImoNumbers(jobExecution);
|
||||
}
|
||||
|
||||
|
||||
불러오는 중...
Reference in New Issue
Block a user