refactor: ignore canceled battles/#659#669
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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
approved these changes
Apr 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
변경사항
findByUserIdWithOutRejected) 쿼리에서CANCELED상태 제외IN_PROGRESS로 시작됨에 따라NOT_STARTED상태 전면 제거BattleStatus.NOT_STARTED열거값 삭제findExpiredNotStartedBattles()관련 쿼리 / 포트 / 어댑터 삭제BattleFinishService의 NOT_STARTED 만료 처리 로직 삭제FindAllBattleInfoService의 NOT_STARTED 결과 분기 및 상수 삭제관련 이슈
Closes #659
추가 컨텍스트
NOT_STARTED는 "승인 후 시작일까지 대기" 플로우에서 사용되던 상태였으나,승인 즉시 배틀이 시작되는 구조로 변경되면서 실제로 이 상태로 진입하는 코드 경로가 없어졌습니다.
DB에 기존
NOT_STARTED레코드가 남아 있을 수 있으므로 필요 시 데이터 마이그레이션을 검토해주세요.