Feat: 진행 테이블 제거 로직
This commit is contained in:
parent
4e3c6e195e
commit
3d1cf56261
@ -29,4 +29,9 @@ public class ProgressCacheRepository {
|
|||||||
String key = CacheKey.autoLabelingProgressKey();
|
String key = CacheKey.autoLabelingProgressKey();
|
||||||
redisTemplate.opsForSet().add(key, projectId);
|
redisTemplate.opsForSet().add(key, projectId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void removePredictProgress(final int projectId) {
|
||||||
|
String key = CacheKey.autoLabelingProgressKey();
|
||||||
|
redisTemplate.opsForSet().remove(key, projectId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,8 @@ public class ProgressService {
|
|||||||
|
|
||||||
public void predictCheck(final int projectId){
|
public void predictCheck(final int projectId){
|
||||||
if(progressCacheRepository.predictCheck(projectId)){
|
if(progressCacheRepository.predictCheck(projectId)){
|
||||||
throw new CustomException(ErrorCode.AI_IN_PROGRESS);
|
// throw new CustomException(ErrorCode.AI_IN_PROGRESS);
|
||||||
|
progressCacheRepository.removePredictProgress(projectId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -179,7 +179,7 @@ public class ProjectService {
|
|||||||
|
|
||||||
// 응답없음
|
// 응답없음
|
||||||
log.debug("요청");
|
log.debug("요청");
|
||||||
progressService.registerPredictProgress(projectId);
|
// progressService.registerPredictProgress(projectId);
|
||||||
List<AutoLabelingResult> list = aiService.postRequest(endPoint, autoLabelingRequest, List.class, this::converter);
|
List<AutoLabelingResult> list = aiService.postRequest(endPoint, autoLabelingRequest, List.class, this::converter);
|
||||||
saveAutoLabelList(list);
|
saveAutoLabelList(list);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user