Refactor: 학습 완료 후 레디스 제거
This commit is contained in:
parent
09cc8da47b
commit
0c57d36355
@ -98,6 +98,11 @@ public class ProgressCacheRepository {
|
||||
.toList();
|
||||
}
|
||||
|
||||
public void clearProgressModel(final int projectId, final int modelId) {
|
||||
String key = CacheKey.trainKey(projectId, modelId);
|
||||
redisTemplate.delete(key);
|
||||
}
|
||||
|
||||
private ReportResponse convert(String data) {
|
||||
return gson.fromJson(data, ReportResponse.class);
|
||||
}
|
||||
|
@ -60,4 +60,7 @@ public class ProgressService {
|
||||
return progressCacheRepository.getProgressModel(projectId, modelId);
|
||||
}
|
||||
|
||||
public void clearProgress(final int projectId, final int modelId) {
|
||||
progressCacheRepository.clearProgressModel(projectId, modelId);
|
||||
}
|
||||
}
|
||||
|
@ -62,5 +62,6 @@ public class ReportService {
|
||||
reports.add(report);
|
||||
}
|
||||
reportRepository.saveAll(reports);
|
||||
progressService.clearProgress(projectId, modelId);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user