Skip to content

Commit

Permalink
Feat/#12 대기열 락 시간 수정 및 허용할 유저 수 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
mk-star authored Jan 4, 2025
2 parents 01ef949 + e4df3d4 commit 997efd7
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public Mono<Long> allowUserWithLock(final String queue, final Long count) {

return Mono.fromCallable(() -> {
// 락 획득 대기 시간 및 유지 시간 설정
boolean isLocked = rLock.tryLock(5, 3, TimeUnit.SECONDS);
boolean isLocked = rLock.tryLock(3, 5, TimeUnit.SECONDS);
if (!isLocked) {
throw new CustomException(ErrorCode.LOCK_ACQUISITION_FAILED);
}
Expand Down Expand Up @@ -149,8 +149,7 @@ public Mono<Long> getRank(final String queue, final String email) {
@SqsListener(value = "queue")
public void moveUsersToAllowedQueue(Acknowledgement acknowledgement) {
// 허용할 유저 수 (3명)
System.out.println("오잉");
var maxAllowUserCount = 3L;
var maxAllowUserCount = 10L;

// 대기열에서 유저를 스캔하여 입장 허용 큐로 이동
reactiveRedisTemplate.scan(ScanOptions.scanOptions()
Expand Down

0 comments on commit 997efd7

Please sign in to comment.