Skip to content

Commit

Permalink
[fix:#11] redisson wait_time, lease_time 수정
Browse files Browse the repository at this point in the history
1. BookingService에서  redisson wait_time, lease_time 을 1초, 1초 -> 1초, 2초로 수정하였습니다.
2. interruptedException이 발생할 경우 globalhandler에서 예외를 잡을 수 있도록 runtime에러를 던지도록 수정
  • Loading branch information
hyejungg committed Oct 5, 2021
1 parent 46a24a3 commit 1e159be
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
@Service
public class BookingService {
private static final int WAIT_TIME = 1;
private static final int LEASE_TIME = 1;
private static final int LEASE_TIME = 2;
private static final String SEAT_LOCK = "seat_lock";

private final BookingRepository bookingRepository;
Expand Down Expand Up @@ -62,7 +62,7 @@ public Booking saveBookging(final BookingDto reqBooking) {
//booking 여부 insert
booking = reqBooking.toEntity(user, performance, seat);
} catch (InterruptedException e) {
e.printStackTrace();
throw new RuntimeException(e.getMessage());
} finally {
lock.unlock();
log.info("lock 반납");
Expand Down

0 comments on commit 1e159be

Please sign in to comment.