refactor: 스케줄러 책임 분리 및 알림 발송 재시도 로직 추가#77
Merged
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a retry mechanism for email and Kakao notifications using Spring Retry and refactors the notification logic into a dedicated QuestionNotificationService. It also renames the daily question service to TodayQuestionService and enhances the scheduler with explicit time zone settings and execution time logging. Feedback was provided regarding the retrieval of a member's previous questions in TodayQuestionService, suggesting that the query should be limited to recent records to prevent performance degradation as the database grows.
| private void processTodayQuestion(MemberSchedulerInfo member) { | ||
| private void generateAndSend(MemberSchedulerInfo member) { | ||
| try { | ||
| List<InterviewQuestion> previousQuestions = questionRepository.findByMemberId(member.id()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 관련 이슈 (Related Issue)
📝 작업 내용 (Description)
DailyQuestionGenerationService→TodayQuestionService로 클래스·메서드·필드명 정비QuestionNotificationService로 분리@Scheduled에 zone = "Asia/Seoul" 추가 (timezone 버그 수정)🔄 변경 유형 (Type of Change)
✅ 체크리스트 (Checklist)
💬 추가 코멘트 (Additional Comments)
EmailService,KakaoService에 적용했습니다.QuestionNotificationService의 내부 private 메서드에는 AOP 프록시가 적용되지 않아 각 서비스 클래스에 직접 붙였습니다.