운영환경일때 ai팀경로수정

This commit is contained in:
2026-02-26 10:36:10 +09:00
parent f2307ff0f4
commit 2508f59a72
3 changed files with 16 additions and 3 deletions

View File

@@ -446,13 +446,22 @@ public class InferenceResultService {
*
* @param dto
*/
// 같은함수가 왜 두개지
private Long ensureAccepted(InferenceSendDto dto) {
if (dto == null) {
log.warn("not InferenceSendDto dto");
throw new CustomApiException("BAD_REQUEST", HttpStatus.BAD_REQUEST);
}
dto.changeValForProd();
// [중복]운영환경일때 경로수정 dean 260226
if (profile != null && profile.equals("prod")) {
log.info("========================================================");
log.info("[CHANGE INFERENCE] profile = {} Inforence req", profile);
log.info("========================================================");
log.info("");
dto.changeValForProd();
}
// 1) 요청 로그
try {

View File

@@ -43,6 +43,7 @@ public class InferenceRunService {
@Value("${inference.url}")
private String inferenceUrl;
// TODO 이거 쓰는건가?
public void run(Integer compareYear, Integer targetYear, UUID modelUuid) {
List<String> compareList = mapSheetMngCoreService.getMapSheetMngHst(compareYear);
@@ -131,7 +132,7 @@ public class InferenceRunService {
// 1) 요청 로그
try {
log.debug("Inference request dto={}", objectMapper.writeValueAsString(dto));
log.info("Inference request dto={}", objectMapper.writeValueAsString(dto));
} catch (JsonProcessingException e) {
log.warn("Failed to serialize inference dto", e);
}

View File

@@ -375,12 +375,13 @@ public class MapSheetInferenceJobService {
* @param dto
* @return
*/
// 같은함수가 왜 두개지
private Long ensureAccepted(InferenceSendDto dto) {
if (dto == null) {
log.warn("not InferenceSendDto dto");
throw new CustomApiException("BAD_REQUEST", HttpStatus.BAD_REQUEST);
}
// 운영환경일때 경로수정 dean 260226
// [중복운영환경일때 경로수정 dean 260226
if (profile != null && profile.equals("prod")) {
log.info("========================================================");
log.info("[CHANGE INFERENCE] profile = {} Inforence req", profile);
@@ -409,6 +410,7 @@ public class MapSheetInferenceJobService {
headers.setContentType(MediaType.APPLICATION_JSON);
headers.setAccept(List.of(MediaType.APPLICATION_JSON));
// TODO 어떤 URL로 어떤파리티러로 요청한 로딩해야지
ExternalCallResult<String> result =
externalHttpClient.call(inferenceUrl, HttpMethod.POST, dto, headers, String.class);
@@ -423,6 +425,7 @@ public class MapSheetInferenceJobService {
objectMapper.readValue(result.body(), new TypeReference<>() {});
if (list.isEmpty()) {
// 어떤 URL로 어떤파리티러로 요청한 정보를 봐야 재현을 할듯하지요
throw new IllegalStateException("Inference response is empty");
}