Skip to content

Commit

Permalink
[fix] 매칭 ttl 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
tmdtmdqorekf committed May 22, 2024
1 parent d49d157 commit 26b57fb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public MatchDto sendMatchRequest(MatchRequestDto dto) {
validateLock(lockKey);

String matchId = UUID.randomUUID().toString();
long expirationTime = System.currentTimeMillis() + TimeUnit.MINUTES.toMillis(1);
long expirationTime = System.currentTimeMillis() + TimeUnit.MINUTES.toMillis(10);
Map<String, String> matchInfo = Map.of(
"matchId", matchId,
"senderId", dto.getSenderId().toString(),
Expand Down Expand Up @@ -91,7 +91,7 @@ public MatchDto sendMatchRequest(MatchRequestDto dto) {
// 10분동안 락 설정
Map<String, String> lockInfo = Map.of("matchId", matchId);
redisTemplate.opsForHash().putAll(lockKey, lockInfo);
redisTemplate.expire(lockKey, 60, TimeUnit.SECONDS);
redisTemplate.expire(lockKey, 600, TimeUnit.SECONDS);

// 알림
User fromUser = userRepository.findByUserId(dto.getSenderId()).orElseThrow();
Expand Down

0 comments on commit 26b57fb

Please sign in to comment.