Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: 엑셀 다운로드 따닥 방지 #1133

Merged
merged 8 commits into from
Dec 15, 2024

Conversation

dradnats1012
Copy link
Contributor

🔥 연관 이슈

🚀 작업 내용

  1. 엑셀 다운로드 중복 요청 방지 기능입니다
  2. 동일한 인자로 30초 동안 재요청을 방지하는 로직을 만들었습니다

💬 리뷰 중점사항

@dradnats1012 dradnats1012 self-assigned this Dec 12, 2024
@github-actions github-actions bot added the 리팩터링 리팩터링을 위한 이슈입니다 label Dec 12, 2024
Copy link

github-actions bot commented Dec 12, 2024

Unit Test Results

346 tests   345 ✔️  1m 35s ⏱️
  41 suites      1 💤
  41 files        0

Results for commit ec54e64.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@Choon0414 Choon0414 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다! 오타 하나만 확인해주세요

@RedisHash(value = "excelDownload")
public class ExcelDownloadCache {

private static final long CACHE_EXPIRE_MINUTES = 30L;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

R
MINUTES ->SECONDS 로 수정해야 될거 같아요.

# Conflicts:
#	src/main/java/in/koreatech/koin/domain/coop/service/CoopService.java
Copy link
Contributor

@kih1015 kih1015 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨어요!

Comment on lines 7 to 8
public class DuplicateExcelRequestException extends DuplicationException {
private static final String DEFAULT_MESSAGE = "동일한 요청을 30초 안에 다시 보낼 수 없습니다!";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

개행 한 줄 필요할 것 같습니다

Copy link
Collaborator

@songsunkook songsunkook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

제가 제안드린 방향으로 구현해주셨네요!! 감사합니다 😄

if (isCacheExist) {
throw DuplicateExcelRequestException.withDetail(startDate, endDate);
}
excelDownloadCacheRepository.save(ExcelDownloadCache.from(startDate.toString() + endDate.toString()));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C

startDate, endDate만 파라미터로 전달하고, 둘을 toString하여 합치는 로직은 from 안에 넣는 건 어떨까요!?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

그게 더 깔끔하고 좋을 것 같네요 👍

@dradnats1012 dradnats1012 merged commit f9b0f38 into develop Dec 15, 2024
4 checks passed
@dradnats1012 dradnats1012 deleted the refactor/excel-duplicate branch December 15, 2024 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
리팩터링 리팩터링을 위한 이슈입니다
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants