Feat: 진행 테이블 제거 로직

This commit is contained in:
김용수 2024-09-24 22:28:56 +09:00
parent 4e3c6e195e
commit 3d1cf56261
3 changed files with 8 additions and 2 deletions

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -179,7 +179,7 @@ public class ProjectService {
// 응답없음
log.debug("요청");
progressService.registerPredictProgress(projectId);
// progressService.registerPredictProgress(projectId);
List<AutoLabelingResult> list = aiService.postRequest(endPoint, autoLabelingRequest, List.class, this::converter);
saveAutoLabelList(list);
}