From 3d1cf5626163977246a1a936ea69549998763e22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=9A=A9=EC=88=98?= Date: Tue, 24 Sep 2024 22:28:56 +0900 Subject: [PATCH] =?UTF-8?q?Feat:=20=EC=A7=84=ED=96=89=20=ED=85=8C=EC=9D=B4?= =?UTF-8?q?=EB=B8=94=20=EC=A0=9C=EA=B1=B0=20=EB=A1=9C=EC=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/progress/repository/ProgressCacheRepository.java | 5 +++++ .../worlabel/domain/progress/service/ProgressService.java | 3 ++- .../com/worlabel/domain/project/service/ProjectService.java | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/com/worlabel/domain/progress/repository/ProgressCacheRepository.java b/backend/src/main/java/com/worlabel/domain/progress/repository/ProgressCacheRepository.java index ddebcd9..1d0fb37 100644 --- a/backend/src/main/java/com/worlabel/domain/progress/repository/ProgressCacheRepository.java +++ b/backend/src/main/java/com/worlabel/domain/progress/repository/ProgressCacheRepository.java @@ -29,4 +29,9 @@ public class ProgressCacheRepository { String key = CacheKey.autoLabelingProgressKey(); redisTemplate.opsForSet().add(key, projectId); } + + public void removePredictProgress(final int projectId) { + String key = CacheKey.autoLabelingProgressKey(); + redisTemplate.opsForSet().remove(key, projectId); + } } diff --git a/backend/src/main/java/com/worlabel/domain/progress/service/ProgressService.java b/backend/src/main/java/com/worlabel/domain/progress/service/ProgressService.java index aab44ef..a5b13a8 100644 --- a/backend/src/main/java/com/worlabel/domain/progress/service/ProgressService.java +++ b/backend/src/main/java/com/worlabel/domain/progress/service/ProgressService.java @@ -16,7 +16,8 @@ public class ProgressService { public void predictCheck(final int projectId){ if(progressCacheRepository.predictCheck(projectId)){ - throw new CustomException(ErrorCode.AI_IN_PROGRESS); +// throw new CustomException(ErrorCode.AI_IN_PROGRESS); + progressCacheRepository.removePredictProgress(projectId); } } diff --git a/backend/src/main/java/com/worlabel/domain/project/service/ProjectService.java b/backend/src/main/java/com/worlabel/domain/project/service/ProjectService.java index 7d5690b..5295c2c 100644 --- a/backend/src/main/java/com/worlabel/domain/project/service/ProjectService.java +++ b/backend/src/main/java/com/worlabel/domain/project/service/ProjectService.java @@ -179,7 +179,7 @@ public class ProjectService { // 응답없음 log.debug("요청"); - progressService.registerPredictProgress(projectId); +// progressService.registerPredictProgress(projectId); List list = aiService.postRequest(endPoint, autoLabelingRequest, List.class, this::converter); saveAutoLabelList(list); }