Skip to content

refactor: ignore canceled battles/#659#669

Merged
redjungi09 merged 4 commits into
developfrom
refactor/ignore-canceled-battles/#659
Apr 12, 2026
Merged

refactor: ignore canceled battles/#659#669
redjungi09 merged 4 commits into
developfrom
refactor/ignore-canceled-battles/#659

Conversation

@hjbin-25

Copy link
Copy Markdown
Member

변경사항

  • 배틀 목록 조회(findByUserIdWithOutRejected) 쿼리에서 CANCELED 상태 제외
  • 배틀 승인 즉시 IN_PROGRESS로 시작됨에 따라 NOT_STARTED 상태 전면 제거
    • BattleStatus.NOT_STARTED 열거값 삭제
    • findExpiredNotStartedBattles() 관련 쿼리 / 포트 / 어댑터 삭제
    • BattleFinishService의 NOT_STARTED 만료 처리 로직 삭제
    • FindAllBattleInfoService의 NOT_STARTED 결과 분기 및 상수 삭제
    • Swagger 문서 오기재("NOT_STARTED 상태가 됨") 수정

관련 이슈

Closes #659

추가 컨텍스트

NOT_STARTED는 "승인 후 시작일까지 대기" 플로우에서 사용되던 상태였으나,
승인 즉시 배틀이 시작되는 구조로 변경되면서 실제로 이 상태로 진입하는 코드 경로가 없어졌습니다.
DB에 기존 NOT_STARTED 레코드가 남아 있을 수 있으므로 필요 시 데이터 마이그레이션을 검토해주세요.

@hjbin-25 hjbin-25 self-assigned this Apr 12, 2026
@hjbin-25 hjbin-25 added the tech-dept 기술 부채 해결 label Apr 12, 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 removes the NOT_STARTED battle status, simplifying the battle lifecycle so that approved battles transition directly to the IN_PROGRESS state. The changes include removing the status from the BattleStatus enum, refactoring the BattleFinishService to remove expiration logic for unstarted battles, and updating associated repository methods, documentation, and tests. Feedback focuses on preventing runtime errors during entity mapping if legacy NOT_STARTED records exist in the database and restoring a check to avoid unnecessary database calls when no battles are updated.

@redjungi09 redjungi09 merged commit 8257f8d into develop Apr 12, 2026
1 check passed
@hjbin-25 hjbin-25 deleted the refactor/ignore-canceled-battles/#659 branch April 12, 2026 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tech-dept 기술 부채 해결

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants