[TEST] 스케쥴링 테스트#345
Conversation
[TEST] 스케쥴링 재설정
There was a problem hiding this comment.
Code Review
This pull request updates the scheduled execution times for three alarm tasks (sendEventAlarms, sendStoreAlarms, and sendHotAlarms) in AlarmSchedulerService to run at 21:45 instead of 21:30. The reviewer noted that because the default Spring scheduler is single-threaded, running all three tasks at the exact same time could lead to execution delays. They recommended staggering the scheduled times or configuring a thread pool to allow parallel execution.
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 45 21 * * *", zone = "Asia/Seoul") | ||
| public void sendEventAlarms() { | ||
| regionalAlarmCommandService.dispatchScheduledEventAlarms(); | ||
| } | ||
|
|
||
| // 기존 설정 시각 | ||
| //@Scheduled(cron = "0 0 10 * * *", zone = "Asia/Seoul") | ||
| @Scheduled(cron = "0 30 21 * * *", zone = "Asia/Seoul") | ||
| @Scheduled(cron = "0 45 21 * * *", zone = "Asia/Seoul") | ||
| public void sendStoreAlarms() { | ||
| regionalAlarmCommandService.dispatchScheduledStoreAlarms(); | ||
| } | ||
|
|
||
| // 기존 설정 시각 | ||
| //@Scheduled(cron = "0 0 18 * * *", zone = "Asia/Seoul") | ||
| @Scheduled(cron = "0 30 21 * * *", zone = "Asia/Seoul") | ||
| @Scheduled(cron = "0 45 21 * * *", zone = "Asia/Seoul") |
There was a problem hiding this comment.
현재 SchedulerConfig에 멀티 스레드 스케줄러 설정이 없기 때문에, Spring의 기본 스케줄러는 단일 스레드(Single-threaded)로 동작합니다. 이 상태에서 세 개의 스케줄러가 모두 동일한 시간(21:45)에 실행되도록 설정되면, 작업들이 순차적으로 실행되어 실행 지연이 발생할 수 있습니다.
테스트 시에도 각 작업의 실행 시간을 분 단위로 분산시키거나, SchedulerConfig에서 스레드 풀을 설정하여 병렬 처리가 가능하도록 개선하는 것이 좋습니다.
| @Scheduled(cron = "0 45 21 * * *", zone = "Asia/Seoul") | |
| public void sendEventAlarms() { | |
| regionalAlarmCommandService.dispatchScheduledEventAlarms(); | |
| } | |
| // 기존 설정 시각 | |
| //@Scheduled(cron = "0 0 10 * * *", zone = "Asia/Seoul") | |
| @Scheduled(cron = "0 30 21 * * *", zone = "Asia/Seoul") | |
| @Scheduled(cron = "0 45 21 * * *", zone = "Asia/Seoul") | |
| public void sendStoreAlarms() { | |
| regionalAlarmCommandService.dispatchScheduledStoreAlarms(); | |
| } | |
| // 기존 설정 시각 | |
| //@Scheduled(cron = "0 0 18 * * *", zone = "Asia/Seoul") | |
| @Scheduled(cron = "0 30 21 * * *", zone = "Asia/Seoul") | |
| @Scheduled(cron = "0 45 21 * * *", zone = "Asia/Seoul") | |
| @Scheduled(cron = "0 45 21 * * *", zone = "Asia/Seoul") | |
| public void sendEventAlarms() { | |
| regionalAlarmCommandService.dispatchScheduledEventAlarms(); | |
| } | |
| // 기존 설정 시각 | |
| //@Scheduled(cron = "0 0 10 * * *", zone = "Asia/Seoul") | |
| @Scheduled(cron = "0 46 21 * * *", zone = "Asia/Seoul") | |
| public void sendStoreAlarms() { | |
| regionalAlarmCommandService.dispatchScheduledStoreAlarms(); | |
| } | |
| // 기존 설정 시각 | |
| //@Scheduled(cron = "0 0 18 * * *", zone = "Asia/Seoul") | |
| @Scheduled(cron = "0 47 21 * * *", zone = "Asia/Seoul") |
🔗 Related Issue
✨ 작업 개요
체크리스트
📷 이미지 첨부 (선택)
🧐 집중 리뷰 요청