Skip to content

Commit d1ceca9

Browse files
committed
feat: 일부 active user 레디스 데이터 3시간 기한 누락되어 재설정
1 parent 0a3a174 commit d1ceca9

File tree

4 files changed

+3
-4
lines changed

4 files changed

+3
-4
lines changed

src/main/java/cmf/commitField/CommitFieldApplication.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,4 @@ public class CommitFieldApplication {
1212
public static void main(String[] args) {
1313
SpringApplication.run(CommitFieldApplication.class, args);
1414
}
15-
1615
}

src/main/java/cmf/commitField/domain/commit/sinceCommit/controller/SinceCommitController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public ResponseEntity<CommitAnalysisResponseDto> getWinterSeasonCommits(
9494
) {
9595
int currentYear = LocalDateTime.now().getYear();
9696
LocalDateTime since = LocalDateTime.of(2024, 12, 1, 0, 0);
97-
LocalDateTime until = LocalDateTime.of(2024 + 1, 2, 1, 23, 59, 59)
97+
LocalDateTime until = LocalDateTime.of(2024 + 1, 2, 28, 23, 59, 59)
9898
.with(TemporalAdjusters.lastDayOfMonth());
9999

100100
CommitAnalysisResponseDto analysis = sinceCommitService.getCommitAnalysis(owner, repo, since, until);

src/main/java/cmf/commitField/domain/commit/totalCommit/controller/TotalCommitController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public TotalCommitResponseDto getWinterSeasonCommits(@AuthenticationPrincipal Cu
7575
String username = oAuth2User.getName();
7676
int currentYear = LocalDateTime.now().getYear(); // 2024.12 ~ 2025.2 대입
7777
LocalDateTime since = LocalDateTime.of(2025 - 1, 12, 1, 0, 0);
78-
LocalDateTime until = LocalDateTime.of(2025, 2, 1, 23, 59, 59)
78+
LocalDateTime until = LocalDateTime.of(2025, 2, 28, 23, 59, 59)
7979
.with(TemporalAdjusters.lastDayOfMonth());
8080
return totalCommitService.getSeasonCommits(username, since, until);
8181
}

src/main/java/cmf/commitField/domain/user/service/CustomOAuth2UserService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public Optional<User> getUserByEmail(String email) {
123123

124124
public void setUserActive(String username) {
125125
String count = String.valueOf(userRepository.findByUsername(username).get().getCommitCount());
126-
redisTemplate.opsForValue().set("commit_active:" + username, count);
126+
redisTemplate.opsForValue().set("commit_active:" + username, count, 3, TimeUnit.HOURS);
127127
redisTemplate.opsForValue().set("commit_lastCommitted:" + username, LocalDateTime.now().toString(),3, TimeUnit.HOURS);
128128

129129
}

0 commit comments

Comments
 (0)