feature/draft: Bot 드래프트 기능 추가 - #165
Conversation
|
Caution Review failedThe pull request is closed. Walkthrough비동기 봇 턴 처리 로직이 DraftService에 추가되고, Redis 상태 키에 TTL(60분)이 TurnService에서 적용되었습니다. PlayerRepository에는 팀/포지션(ElementType)을 즉시 로딩하는 조회 메서드가 추가되었습니다. DraftService는 스케줄러로 봇 턴을 10초 후 실행하며, 트랜잭션 보장을 위해 self 프록시를 사용합니다. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User as 사람 참가자
participant DraftSvc as DraftService
participant Scheduler as ScheduledExecutorService
participant SelfProxy as DraftService (proxy)
participant Repo as PlayerRepository / Draft/Participant Repos
participant TurnSvc as TurnService
participant Redis as Redis
rect rgba(230,240,255,0.5)
User->>DraftSvc: 사람 턴 처리(기존 흐름)
DraftSvc->>TurnSvc: 상태 업데이트/방송
TurnSvc->>Redis: 해시 putAll + TTL 60분
end
alt 다음 참가자가 봇
DraftSvc-->>Scheduler: 봇 턴 10초 후 스케줄
Note over Scheduler: 지연 후 실행
Scheduler-->>SelfProxy: handleBotTurn(draftId, botId)
SelfProxy->>Repo: 드래프트/참가자/가용 선수 조회
SelfProxy->>SelfProxy: 무작위 선수 선택/검증
SelfProxy->>TurnSvc: 상태 업데이트/방송
TurnSvc->>Redis: 해시 putAll + TTL 60분
else 다음 참가자가 사람
DraftSvc-->>User: 대기
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. 📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (3)
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
Summary by CodeRabbit