Skip to content

refactor: 알림 서비스에서 전송 큐·메일 발송·신청서 채널 알림·안내 메일을 떼어 냄 - #711

Merged
yoon6yo merged 1 commit into
mainfrom
refactor/v3.3.73-alarm-transport-split
Oct 13, 2026
Merged

yoon6yo merged 1 commit into
mainfrom
refactor/v3.3.73-alarm-transport-split

Conversation

@yoon6yo

@yoon6yo yoon6yo commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

변경

737줄이던 AlarmService가 큐 전송, 메일 발송, 채널 선택, 문구 작성을 모두 맡고 있어, "어떻게 보내는가"와 "무엇을 쓰는가"를 나눴다. 보내는 내용·채널·시점은 바꾸지 않았다.

클래스 맡는 일
AlarmService 성격별 창구: alertNeedsAction, recordLog, notifyUser, mailUser
SlackNotificationQueue 큐 적재, 큐 장애 시 직접 전송
NotificationMailer 메일 한 통 발송(실패는 결과로 알림)
NotificationChannels 오류·기록 채널 주소 설정
RequestChannelNotifier 신청서 채널 알림 7종과 채널 선택
UserGuideMailer 사용자 안내 메일 9종
  • 주제별 메서드를 부르던 8개 파일의 주입을 새 클래스로 바꿈. 메서드 이름과 인자는 그대로.
  • 메일 발송 기록 규칙(보냈으면 기록, 실패하면 오류 채널 알림)은 AlarmService.mailUser에 둠 — 메일러로 옮기면 서로 참조하게 된다.

테스트

  • AlarmServiceTest는 실제 객체를 이어 붙여 호출부터 큐에 실리는 글·보내는 메일까지 그대로 검증(파일 분리는 하지 않음)
  • 호출부 테스트 8개는 대역을 새 클래스로 바꾸고, 알림 미발송 검증을 새 대역까지 넓힘

확인

  • ./gradlew cleanTest build --rerun-tasks 통과, 테스트 1329건 실패 0건(건수 변화 없음)
  • 옮기기 전후 알림 문구 키 31개 동일

확인하지 못한 것

  • 실제 Slack·메일 발송과 실제 기동. 실험 스택에서 신청→승인→거절을 한 번 돌려 본다.

🤖 Generated with Claude Code

- AlarmService는 성격별 창구(조치 필요·처리 기록·사용자 안내·메일 안내)만 남김
- SlackNotificationQueue(큐 적재와 장애 시 직접 전송), NotificationMailer(메일 발송), NotificationChannels(채널 주소)
- RequestChannelNotifier(신청서 채널 알림 7종), UserGuideMailer(안내 메일 9종)
- 보내는 내용·채널·시점은 그대로, 문구 키 31개 동일

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@yoon6yo
yoon6yo merged commit 9dd7654 into main Oct 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant