추론 실행 api 수정
This commit is contained in:
@@ -84,14 +84,14 @@ public class InferenceResultApiController {
|
|||||||
mediaType = "application/json",
|
mediaType = "application/json",
|
||||||
schema =
|
schema =
|
||||||
@Schema(
|
@Schema(
|
||||||
description = "진행 여부 (Y: 진행중, N: 없음)",
|
description = "진행 여부 (UUID 있으면 진행중)",
|
||||||
type = "string",
|
type = "UUID",
|
||||||
example = "N"))),
|
example = "44709877-2e27-4fc5-bacb-8e0328c69b64"))),
|
||||||
@ApiResponse(responseCode = "400", description = "잘못된 검색 조건", content = @Content),
|
@ApiResponse(responseCode = "400", description = "잘못된 검색 조건", content = @Content),
|
||||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||||
})
|
})
|
||||||
@GetMapping("/processing-yn")
|
@GetMapping("/processing-yn")
|
||||||
public ApiResponseDto<String> getProcessing() {
|
public ApiResponseDto<UUID> getProcessing() {
|
||||||
return ApiResponseDto.ok(inferenceResultService.getProcessing());
|
return ApiResponseDto.ok(inferenceResultService.getProcessing());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -460,5 +460,6 @@ public class InferenceResultDto {
|
|||||||
private ZonedDateTime modelStartDttm;
|
private ZonedDateTime modelStartDttm;
|
||||||
private ZonedDateTime modelEndDttm;
|
private ZonedDateTime modelEndDttm;
|
||||||
private Long updateUid;
|
private Long updateUid;
|
||||||
|
private String runningModelType;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ public class InferenceResultService {
|
|||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public String getProcessing() {
|
public UUID getProcessing() {
|
||||||
return inferenceResultCoreService.getProcessing();
|
return inferenceResultCoreService.getProcessing();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -347,7 +347,7 @@ public class InferenceResultCoreService {
|
|||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public String getProcessing() {
|
public UUID getProcessing() {
|
||||||
return mapSheetLearnRepository.getProcessing();
|
return mapSheetLearnRepository.getProcessing();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,5 +24,5 @@ public interface MapSheetLearnRepositoryCustom {
|
|||||||
|
|
||||||
InferenceStatusDetailDto getInferenceStatus(UUID uuid);
|
InferenceStatusDetailDto getInferenceStatus(UUID uuid);
|
||||||
|
|
||||||
String getProcessing();
|
UUID getProcessing();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -232,16 +232,11 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
|||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public String getProcessing() {
|
public UUID getProcessing() {
|
||||||
Long processing =
|
return queryFactory
|
||||||
queryFactory
|
.select(mapSheetLearnEntity.uuid)
|
||||||
.select(mapSheetLearnEntity.count())
|
|
||||||
.from(mapSheetLearnEntity)
|
.from(mapSheetLearnEntity)
|
||||||
.where(mapSheetLearnEntity.status.eq("IN_PROGRESS"))
|
.where(mapSheetLearnEntity.status.eq("IN_PROGRESS"))
|
||||||
.fetchOne();
|
.fetchOne();
|
||||||
if (Long.valueOf(0L).equals(processing)) {
|
|
||||||
return "N";
|
|
||||||
}
|
|
||||||
return "Y";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ public class MapSheetInferenceJobService {
|
|||||||
m.setCls_model_path(
|
m.setCls_model_path(
|
||||||
progressDto.getCdModelClsPath() + "/" + progressDto.getCdModelClsFileName());
|
progressDto.getCdModelClsPath() + "/" + progressDto.getCdModelClsFileName());
|
||||||
m.setCls_model_version(progressDto.getClsModelVersion());
|
m.setCls_model_version(progressDto.getClsModelVersion());
|
||||||
m.setCd_model_type(inferenceType);
|
m.setCd_model_type(type);
|
||||||
m.setPriority(progressDto.getPriority());
|
m.setPriority(progressDto.getPriority());
|
||||||
|
|
||||||
// 추론 다음모델 실행
|
// 추론 다음모델 실행
|
||||||
@@ -188,6 +188,7 @@ public class MapSheetInferenceJobService {
|
|||||||
saveInferenceAiDto.setStatus(Status.IN_PROGRESS.getId());
|
saveInferenceAiDto.setStatus(Status.IN_PROGRESS.getId());
|
||||||
saveInferenceAiDto.setType(type);
|
saveInferenceAiDto.setType(type);
|
||||||
saveInferenceAiDto.setModelStartDttm(ZonedDateTime.now());
|
saveInferenceAiDto.setModelStartDttm(ZonedDateTime.now());
|
||||||
|
saveInferenceAiDto.setRunningModelType(inferenceType);
|
||||||
inferenceResultCoreService.update(saveInferenceAiDto);
|
inferenceResultCoreService.update(saveInferenceAiDto);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user