fix: 공지 폴링 24시간 매 30분으로 확대 — 심야 공지 아침 몰림 해소 - #63
Conversation
기존 폴링(0,1,9-23시 매시 17회/일)은 새벽 2~9시가 공백이라, 그 사이 게시된 심야 버그픽스 공지들이 9시 첫 폴링에 한꺼번에 몰려 발송됐다. CronTrigger를 minute="0,30"으로 바꿔 24시간 매 30분(48회/일) 폴링한다. 각 공지가 게시 후 ~30분 내 개별 발송된다. NOTICE_HOURS 상수는 미사용이 되어 제거. dedup는 그대로: notice_state.last_identifier(영속) 기반 전진-only 마커라 배포/재시작으로 기존 공지가 재발송되지 않는다. max_instances=1·coalesce=True 유지. 폴링 빈도가 늘어도 메시지 수는 동일(같은 공지 1회)이고, 넥슨 앱키 부하는 96콜/일로 무시 수준. 문서 동기화: design §3.6·work-plan 실빌드 기록·ADR-0017 표(각각 6→17→24h 반영 누락분 포함).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
Next review available in: 52 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. 📝 WalkthroughWalkthroughThe ChangesNotice Polling Cadence Update
Estimated code review effort: 1 (Trivial) | ~5 minutes Sequence Diagram(s)sequenceDiagram
participant Scheduler as start_scheduler
participant Trigger as CronTrigger
participant Job as run_notice_job
Scheduler->>Trigger: register CronTrigger(minute="0,30")
loop Every 30 minutes, 24h
Trigger->>Job: trigger run_notice_job
end
Scheduler->>Scheduler: log "공지(매 30분)"
Related PRs: None mentioned. Suggested labels: documentation, scheduler Suggested reviewers: None specified. Poem:
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
docs/work-plan.md (1)
23-23: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winStale schedule reference: "6시각 폴링" contradicts the updated cadence.
Line 23 still says "/공지알림 6시각 폴링·baseline은 봇 가동 시 1주기 관찰.", but line 82 in the same file now documents the new 48회/일 (24시간 매 30분) cadence. This leaves two contradictory descriptions of the same feature within one document.
📝 Suggested fix
-**다음 작업 후보**: 구현 단계 종료 — 남은 것은 **봇 가동 시 라이브 검증**뿐. **Phase 5 운영 요약** 발송 1회(`scripts/trigger_ops_summary.py` — 앱키 빨강·"외 N종"·헬스 command 분해 눈 확인). `/잠재` G1 등업 라이브 확정은 봇 가동 시 `scripts/spike_potential.py` 1콜로 마무리. `/공지알림` 6시각 폴링·baseline은 봇 가동 시 1주기 관찰. +**다음 작업 후보**: 구현 단계 종료 — 남은 것은 **봇 가동 시 라이브 검증**뿐. **Phase 5 운영 요약** 발송 1회(`scripts/trigger_ops_summary.py` — 앱키 빨강·"외 N종"·헬스 command 분해 눈 확인). `/잠재` G1 등업 라이브 확정은 봇 가동 시 `scripts/spike_potential.py` 1콜로 마무리. `/공지알림` 24시간 매 30분 폴링·baseline은 봇 가동 시 1주기 관찰.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/work-plan.md` at line 23, Update the stale schedule text in the work-plan so the `/공지알림` polling description matches the current cadence documented elsewhere in the same file. In the affected bullet under “다음 작업 후보,” replace the old “6시각 폴링·baseline” wording with the new 48회/일 (24시간 매 30분) cadence, keeping the rest of the note intact. Use the `/공지알림` and “baseline” references to locate the exact sentence to edit.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@docs/work-plan.md`:
- Line 23: Update the stale schedule text in the work-plan so the `/공지알림`
polling description matches the current cadence documented elsewhere in the same
file. In the affected bullet under “다음 작업 후보,” replace the old “6시각 폴링·baseline”
wording with the new 48회/일 (24시간 매 30분) cadence, keeping the rest of the note
intact. Use the `/공지알림` and “baseline” references to locate the exact sentence
to edit.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: a6a78dbf-ed77-4292-bf38-3177146da77f
📒 Files selected for processing (4)
docs/adr/0017-notification-unification-and-dm-subscription.mddocs/work-plan.mdmaple-discord-bot-design.mdmaple_mate/notification/scheduler.py
line 23의 과거 '다음 작업 후보' 스냅샷에 남아있던 '6시각' 빈도 수식어가 24시간 매 30분 주기와 모순 → 수식어만 제거.
|
@coderabbitai 지적 반영했습니다. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
sed -n '15,30p' docs/work-plan.md
git log --oneline -3 -- docs/work-plan.mdLength of output: 1640 🏁 Script executed: #!/bin/bash
git show a585b97 -- docs/work-plan.mdLength of output: 1392 Confirmed. The commit removes the stale "6시각" modifier from the
(=^・ω・^=)ノ |
배경
기존 공지 폴링은
0,1,9-23시 **매시 정각(17회/일)**이라 새벽 2~9시가 공백이었다. 그 사이 게시된 심야 버그픽스 공지가 9시 첫 폴링에 한꺼번에 몰려서 발송되는 문제가 있었다.변경
CronTrigger를minute="0,30"으로 변경 → 24시간 매 30분(48회/일) 폴링. 각 공지가 게시 후 ~30분 내 개별 발송된다.NOTICE_HOURS상수 제거(+ 시작 로그 문구 갱신).안전성
notice_state.last_identifier(Postgres 영속) 기반 전진-only 마커. 이번 변경은 Python 상수 수정뿐 DB 마이그레이션 없음 → 배포/재시작으로 기존 공지가 신규로 재처리되지 않는다.30분→15분.max_instances=1·coalesce=True유지 → 중복 실행 차단.문서 동기화
maple-discord-bot-design.md§3.6 (정본) — 6시각 → 24h/30분docs/work-plan.md실빌드 기록 — 6→17→24h 이력 반영docs/adr/0017표 셀 — 폴링 주기 갱신 (feat: 공지 알림 폴링 6회/일 → 17회/일(9~23시 매시 + 0·1시) 확대 #57 누락분 포함 정정)테스트
CronTrigger(minute="0,30")실측: 하루 48회 발화, 새벽 2:40 이후 3:00·3:30·4:00… 커버 확인남은 것
Summary by CodeRabbit
Bug Fixes
Documentation