[TEST] 알람 스케쥴링 재테스트#347
Conversation
[TEST] 알람 스케쥴링 재테스트
There was a problem hiding this comment.
Code Review
This pull request updates the cron schedules for sendEventAlarms, sendStoreAlarms, and sendHotAlarms to run at the same time (22:15:00). The review feedback points out that because Spring's default scheduler is single-threaded, running these tasks simultaneously can cause sequential execution delays. It is recommended to either stagger the execution times or configure a multi-threaded task scheduler.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| @Scheduled(cron = "0 15 22 * * *", zone = "Asia/Seoul") | ||
| public void sendEventAlarms() { | ||
| regionalAlarmCommandService.dispatchScheduledEventAlarms(); | ||
| } | ||
|
|
||
| // 기존 설정 시각 | ||
| //@Scheduled(cron = "0 0 10 * * *", zone = "Asia/Seoul") | ||
| @Scheduled(cron = "0 45 21 * * *", zone = "Asia/Seoul") | ||
| @Scheduled(cron = "0 15 22 * * *", zone = "Asia/Seoul") | ||
| public void sendStoreAlarms() { | ||
| regionalAlarmCommandService.dispatchScheduledStoreAlarms(); | ||
| } | ||
|
|
||
| // 기존 설정 시각 | ||
| //@Scheduled(cron = "0 0 18 * * *", zone = "Asia/Seoul") | ||
| @Scheduled(cron = "0 45 21 * * *", zone = "Asia/Seoul") | ||
| @Scheduled(cron = "0 15 22 * * *", zone = "Asia/Seoul") |
There was a problem hiding this comment.
현재 세 개의 스케줄러 작업(sendEventAlarms, sendStoreAlarms, sendHotAlarms)이 모두 동일한 시간(22:15:00)에 실행되도록 설정되어 있습니다.\n\nSpring의 기본 @Scheduled 설정은 단일 스레드(Single-threaded)로 동작하기 때문에, 별도의 스레드 풀(TaskScheduler) 설정이 없다면 이 세 작업은 동시가 아닌 순차적으로 실행됩니다. 하나의 작업이 지연되면 다른 작업의 실행 시간도 함께 밀리게 되는 병목 현상이 발생할 수 있습니다.\n\n권장 사항:\n1. 테스트 목적이더라도 실제 운영 환경을 고려하여 각 스케줄러의 실행 시간을 수 분 간격으로 분산시키거나,\n2. SchedulerConfig 등에서 ThreadPoolTaskScheduler를 빈으로 등록하여 멀티 스레드 환경에서 스케줄러가 병렬로 동작할 수 있도록 설정을 추가하는 것이 좋습니다.
@Scheduled(cron = "0 15 22 * * *", zone = "Asia/Seoul")\n public void sendEventAlarms() {\n regionalAlarmCommandService.dispatchScheduledEventAlarms();\n }\n\n // 기존 설정 시각\n //@Scheduled(cron = "0 0 10 * * *", zone = "Asia/Seoul")\n @Scheduled(cron = "0 16 22 * * *", zone = "Asia/Seoul")\n public void sendStoreAlarms() {\n regionalAlarmCommandService.dispatchScheduledStoreAlarms();\n }\n\n // 기존 설정 시각\n //@Scheduled(cron = "0 0 18 * * *", zone = "Asia/Seoul")\n @Scheduled(cron = "0 17 22 * * *", zone = "Asia/Seoul")
🔗 Related Issue
✨ 작업 개요
체크리스트
📷 이미지 첨부 (선택)
🧐 집중 리뷰 요청