-
Notifications
You must be signed in to change notification settings - Fork 7
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
서포터가 선택완료 된 후 기간 만료가 되면 3일 뒤 자동 리뷰 완료로 상태 변경하는 기능 구현 #727
Open
cookienc
wants to merge
7
commits into
dev/BE
Choose a base branch
from
feat/718
base: dev/BE
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.
Conversation
This file contains 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
shb03323
reviewed
Mar 5, 2024
|
||
private static final int GRACE_PERIODS_DAYS = 3; | ||
|
||
private final TaskScheduler taskScheduler; |
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.
이거 일단 해보고, 불편하면 우테코 금지되었던거 써볼까...?
shb03323
reviewed
Mar 5, 2024
@Transactional(readOnly = true) | ||
public RunnerPost joinBySupporter(final Long runnerPostId) { | ||
return runnerPostDeadlineQueryRepository.joinSupporterByRunnerPostId(runnerPostId) | ||
.orElseThrow(() -> new ScheduleBusinessException(String.format("RunnerPost를 찾을 수 없습니다. runnerPostId=%s",runnerPostId))); |
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.
마지막 컴마 뒤에 띄어쓰기
밑에 함수도 마찬가지
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.
관련이슈
참고사항
서포터가 리뷰 완료하고 리뷰 완료 버튼을 안 누르면 아래와 같은 문제가 발생합니다.
이 문제를 해결하기 위해서
리뷰 진행 중 + 기간 만료 후 3일
이면 자동으로 리뷰 완료 변하는 기능 개발했습니다.Schedule를 1분마다 돌리는 방향도 있지만, 1분마다 돌리는거에 대한 거부감 때문에 TaskSheduler로 개발했습니다.
이 과정에서 schedule 패키지 안에 deadline을 만들고 command, query를 분리했습니다.
기존에 있던 schedule도 이에 맞게 이름도 변경했습니다.
개발하면서 고련한건 WAS가 늘어났을 때 문제, 배포 시에 schedule 유실 문제입니다.
finishReview()
를 호출해서reviewCount
가 비정상적으로 증가될 여지가 있어서 비관적 락을 사용해서 예방했습니다.참고