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: 후원 API 중복 요청을 방지한다. (따닥 방지) #448

Merged
merged 6 commits into from
Jan 5, 2024

Conversation

pushedrumex
Copy link
Member

@pushedrumex pushedrumex commented Jan 3, 2024

⛏ 작업 사항

  • Redis 의 String 자료구조와 TTL 을 사용하여 후원 API 중복 요청을 방지하였습니다.

📝 작업 요약

  • 후원 API 요청 시 Redis 에 donation:{volunteerId} : true 저장
  • TTL 을 1초로 설정하여 1초 후 저장한 값 삭제
  • 1초 내의 중복 요청 시 DonationDuplicateException 발생
  • 독립적인 테스트를 위해 DatebaseCleaner 에 Redis 초기화 수행

💡 관련 이슈

@pushedrumex pushedrumex self-assigned this Jan 3, 2024
@github-actions github-actions bot added the 🔨 Refactor 코드 리팩토링 및 구조 개선 label Jan 3, 2024
Copy link

github-actions bot commented Jan 3, 2024

Test Results

286 files  +3  286 suites  +3   26s ⏱️ -2s
656 tests +2  656 ✅ +2  0 💤 ±0  0 ❌ ±0 
665 runs  +2  665 ✅ +2  0 💤 ±0  0 ❌ ±0 

Results for commit 208c02c. ± Comparison against base commit 4a18216.

♻️ This comment has been updated with latest results.

@pushedrumex pushedrumex requested a review from hseong3243 January 4, 2024 16:52
Copy link

sonarqubecloud bot commented Jan 5, 2024

@pushedrumex pushedrumex merged commit 31880d8 into dev Jan 5, 2024
4 checks passed
@pushedrumex pushedrumex deleted the refactor/#446 branch January 5, 2024 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 Refactor 코드 리팩토링 및 구조 개선
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

refactor: 후원 API 중복 요청을 방지한다. (따닥 방지)
3 participants