-
Notifications
You must be signed in to change notification settings - Fork 1
[BE-FIX] sync_token 만료 시 재시도하지 않도록 수정 #407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kwon204
wants to merge
4
commits into
dev
Choose a base branch
from
bugfix/be/sync-token-retry
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getSyncToken을 재시도하는 이유가 뭘까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요약: syncToken이 만료되었을 때 전체 일정을 가져오는 URL을 새로 생성하기 위해 사용합니다.
129번째 줄에서 url을 생성할 때 syncToken이 있다면 URL 쿼리에 syncToken을 추가하고 null 이라면 추가하지 않은(전체 일정을 가져오는) url을 생성합니다.
만약 API를 요청할 때 syncToken이 만료되거나 유효하지 않다면, RetryExecutor에서 DB의 syncToken을 null로 설정합니다. 그 이후에 재시도할 때는 이전에 사용한 URL이 아닌 syncToken이 포함되지 않은(전체 일정을 가져오는) URL로 재시도해야 합니다.
이전 코드를 보면 eventsUrl을 람다 함수 밖에서 만들어서 주입해주고 있는데요. 따로 조사한 결과, 람다 함수 외부에서 주입된 변수는 final로 처리되어 수정이 되지 않는다고 합니다. 따라서 새로 생성한 url을 적용하기 위해서 람다 함수 내부에서 url을 생성하기 위해 url 생성 과정에 필요한 getSyncToken을 재시도하고 있습니다.!