[TEST] 알람 스케쥴링 재테스트#346
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the scheduled execution times for three alarm services (sendEventAlarms, sendStoreAlarms, and sendHotAlarms) to run at 22:15. The reviewer noted that scheduling all three tasks at the exact same time can cause sequential execution delays under Spring's default single-threaded scheduler, and suggested staggering the times or configuring a thread pool.
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)에 실행되도록 설정되어 있습니다. Spring의 기본 TaskScheduler는 단일 스레드로 동작하므로, 이 작업들이 병렬로 실행되지 않고 순차적으로 실행되어 이전 작업의 실행 시간에 따라 다음 작업이 지연될 수 있습니다. 작업 간의 실행 시간을 몇 분 간격으로 분산(staggering)시키거나, SchedulerConfig에서 스레드 풀을 설정하여 병렬 처리가 가능하도록 개선하는 것을 권장합니다.
| @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") | |
| @Scheduled(cron = "0 15 22 * * *", zone = "Asia/Seoul") | |
| public void sendEventAlarms() { | |
| regionalAlarmCommandService.dispatchScheduledEventAlarms(); | |
| } | |
| // 기존 설정 시각 | |
| //@Scheduled(cron = "0 0 10 * * *", zone = "Asia/Seoul") | |
| @Scheduled(cron = "0 16 22 * * *", zone = "Asia/Seoul") | |
| public void sendStoreAlarms() { | |
| regionalAlarmCommandService.dispatchScheduledStoreAlarms(); | |
| } | |
| // 기존 설정 시각 | |
| //@Scheduled(cron = "0 0 18 * * *", zone = "Asia/Seoul") | |
| @Scheduled(cron = "0 17 22 * * *", zone = "Asia/Seoul") |
🔗 Related Issue
✨ 작업 개요
체크리스트
📷 이미지 첨부 (선택)
🧐 집중 리뷰 요청