Skip to content

[TEST] 스케쥴링 시간 조정 완#348

Merged
taerimiiii merged 1 commit into
mainfrom
develop
Jun 15, 2026
Merged

[TEST] 스케쥴링 시간 조정 완#348
taerimiiii merged 1 commit into
mainfrom
develop

Conversation

@taerimiiii

@taerimiiii taerimiiii commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

🔗 Related Issue

  • resolve #이슈번호

✨ 작업 개요

작업 내용을 간략하게 작성해주세요.

체크리스트

  • Reviewers, Assignees, Labels를 모두 등록했나요?
  • .gitignore 설정을 하였나요?
  • PR 머지 전 반드시 CI가 정상적으로 작동하는지 확인해주세요!

📷 이미지 첨부 (선택)

  • 작업 결과를 확인할 수 있는 이미지나 GIF를 첨부해주세요.
  • UI 변경, API 응답 샘플, 테스트 결과 등이 포함되면 좋아요!

🧐 집중 리뷰 요청

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요.

@taerimiiii taerimiiii self-assigned this Jun 15, 2026
@taerimiiii taerimiiii added the 🧪 test 테스트 코드 label Jun 15, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the cron schedules for event, store, and hot alarms in AlarmSchedulerService. The review feedback recommends externalizing these hardcoded cron expressions to a configuration file (such as application.yml) for better environment-specific management. Additionally, it highlights a potential issue where the short 2-second intervals between the scheduled tasks might cause execution delays if the tasks take longer than 2 seconds, given Spring's default single-threaded scheduler behavior.

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 30 22 * * *", zone = "Asia/Seoul")
@Scheduled(cron = "0 5 15 * * *", zone = "Asia/Seoul")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

스케줄링 주기(cron 표현식)가 소스 코드에 하드코딩되어 있어, 테스트나 환경별(로컬, 개발, 운영)로 주기를 변경할 때마다 코드를 직접 수정해야 하는 불편함이 있습니다. 이를 application.yml 등의 설정 파일로 분리하여 @Scheduled(cron = "${schedules.event-alarm}") 형태로 관리하는 것을 권장합니다.

Suggested change
@Scheduled(cron = "0 5 15 * * *", zone = "Asia/Seoul")
@Scheduled(cron = "${schedules.event-alarm}", zone = "Asia/Seoul")

// 기존 설정 시각
//@Scheduled(cron = "0 0 10 * * *", zone = "Asia/Seoul")
@Scheduled(cron = "0 30 22 * * *", zone = "Asia/Seoul")
@Scheduled(cron = "2 5 15 * * *", zone = "Asia/Seoul")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

스토어 알림 스케줄링 주기도 설정 파일로 분리하여 관리하는 것을 권장합니다.\n\n추가로, 현재 각 스케줄러 간의 간격이 2초(15:05:00, 15:05:02, 15:05:04)로 매우 짧게 설정되어 있습니다. Spring의 기본 스케줄러는 단일 스레드(Single-threaded)로 동작하므로, 앞선 작업(sendEventAlarms)이 2초 이상 걸릴 경우 뒤이어 실행되어야 할 sendStoreAlarms 작업이 지연될 수 있습니다. 스케줄러 스레드 풀 설정을 확인하시거나 작업 간의 간격을 충분히 넓히는 것을 고려해 주세요.

Suggested change
@Scheduled(cron = "2 5 15 * * *", zone = "Asia/Seoul")
@Scheduled(cron = "${schedules.store-alarm}", zone = "Asia/Seoul")

// 기존 설정 시각
//@Scheduled(cron = "0 0 18 * * *", zone = "Asia/Seoul")
@Scheduled(cron = "0 30 22 * * *", zone = "Asia/Seoul")
@Scheduled(cron = "4 5 15 * * *", zone = "Asia/Seoul")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

핫 알림 스케줄링 주기도 설정 파일로 분리하여 관리하는 것을 권장합니다.

Suggested change
@Scheduled(cron = "4 5 15 * * *", zone = "Asia/Seoul")
@Scheduled(cron = "${schedules.hot-alarm}", zone = "Asia/Seoul")

@taerimiiii taerimiiii merged commit 17b20c1 into main Jun 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🧪 test 테스트 코드

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant