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