Uh oh!
There was an error while loading. Please reload this page.
[Refactor] FCM 토큰 등록 경로를 워커로 통합 - #575
Merged
Merged
Conversation
진입 경로와 워커가 같은 일을 두 갈래로 하던 것을 워커 하나로 모읍니다. 재시도와 백오프, 프로세스 종료 후 재개를 WorkManager가 맡습니다.
edv-Shinforce-pushed
the
refactor/fcm-registration-worker-569
branch
from
August 16, 2026 03:53
408a85d to
8dd9ee5CompareUh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
#️⃣연관된 이슈
Closes#569
📝작업 내용
FCM 토큰 등록이 앱 진입 경로와 워커 두 갈래로 나뉘어 있던 것을 워커 하나로 모았습니다. 재시도와 백오프, 프로세스 종료 후 재개를 WorkManager가 맡습니다.
FcmTokenSyncScheduler 추가
MainViewModel은 라우팅만 담당
로그아웃 시 예약 취소
재시도 상한 5회 → 10회
테스트
FcmTokenSyncPolicyTest
MainViewModelTest
ClearSessionUseCaseTest
스크린샷 (선택)
💬리뷰 요구사항(선택)
취소를 부르는 자리를 ClearSessionUseCase로 잡았습니다. 이슈에는 "로그아웃 시"라고만 적었는데 사용자 로그아웃과 강제 로그아웃이 둘 다 이 유스케이스를 거쳐서 한 곳에 넣으면 두 경로가 함께 덮입니다. 로그아웃 유스케이스 쪽에 두는 편이 나을지 봐주세요.
재시도 상한은 올리기만 하고 주기 워커는 넣지 않았습니다. 주기 워커를 두면 등록 완료 시 취소하는 경로까지 함께 얹어야 해서 이 PR 범위를 넘어섭니다. 10회로 부족하다고 보시면 알려주세요.
워커의 만료 토큰 선갱신 분기는 CoroutineWorker 안이라 JVM 테스트가 안 됩니다. 갱신 실패 판단만 FcmTokenSyncPolicy.shouldRetryAfterRefreshFailure()로 빼서 테스트로 덮었고, 워커 전체를 감싸는 클래스를 새로 만드는 쪽은 침습이 커서 하지 않았습니다.
수동 확인은 아직입니다. 실기기가 필요한 항목들입니다.