[TEST] 테스트 적용#379
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the hardcoded cron schedules for various alarm and cache rebuilding tasks in AlarmSchedulerService and PinGeoScheduler. The review feedback recommends externalizing these cron expressions to application properties using Spring placeholders, which improves flexibility across different environments and prevents accidental production changes during testing.
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 0 13 * * *", zone = "Asia/Seoul") | ||
| @Scheduled(cron = "0 5 15 * * *", zone = "Asia/Seoul") | ||
| @Scheduled(cron = "0 0 14 * * *", zone = "Asia/Seoul") |
There was a problem hiding this comment.
스케줄러의 크론(cron) 표현식을 소스 코드에 하드코딩하면, 테스트 환경이나 운영 환경에 따라 주기를 변경할 때마다 코드를 수정하고 재빌드해야 합니다. 특히 테스트를 위해 임시로 수정한 크론 설정이 실수로 운영 환경에 반영될 위험이 있습니다. Spring의 프로퍼티 플레이스홀더를 사용하여 크론 표현식을 외부 설정 파일(application.yml)로 관리하고, 기본값을 제공하는 방식을 권장합니다.
| @Scheduled(cron = "0 0 14 * * *", zone = "Asia/Seoul") | |
| @Scheduled(cron = "${app.scheduler.cron.event:0 0 14 * * *}", zone = "Asia/Seoul") |
| // 기존 설정 시각 | ||
| //@Scheduled(cron = "0 0 10 * * *", zone = "Asia/Seoul") | ||
| @Scheduled(cron = "2 5 15 * * *", zone = "Asia/Seoul") | ||
| @Scheduled(cron = "1 0 14 * * *", zone = "Asia/Seoul") |
| // 기존 설정 시각 | ||
| //@Scheduled(cron = "0 0 18 * * *", zone = "Asia/Seoul") | ||
| @Scheduled(cron = "4 5 15 * * *", zone = "Asia/Seoul") | ||
| @Scheduled(cron = "2 0 14 * * *", zone = "Asia/Seoul") |
| private final RedisTemplate<String, String> redisTemplate; | ||
|
|
||
| @Scheduled(cron = "0 0 5 * * *", zone = "Asia/Seoul") | ||
| @Scheduled(cron = "0 25 13 * * *", zone = "Asia/Seoul") |
There was a problem hiding this comment.
🔗 Related Issue
✨ 작업 개요
체크리스트
📷 이미지 첨부 (선택)
🧐 집중 리뷰 요청