Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public void publisherToUser(QueueEntryStatusResponse response) {

}

//TODO 프로젝트 종료 후 상위 인원에게만 broadcast하는 방식으로 수정 고려. 아직은 테스트 인원이 적기 때문에 보류
//broadcast - 대기 상태
public void publishBatchUpdate(WaitingQueueBatchEventResponse event) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@
* 대기열 입장 처리 스케줄러
* WAITING -> ENTERED
* WAITING 상태 사용자에게 실시간 순위 업데이트 (WebSocket)
* 해당 스케줄러는 10초마다 동작하기 때문에 서버 부담을 줄이기 위해 임시로 prod 환경에서 비활성화
*/
@Component
@RequiredArgsConstructor
@Slf4j
@Profile({"perf", "prod"})
@Profile({"perf"})
public class QueueEntryScheduler {

private static final String JOB_NAME = "QueueEntry";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;

/*
* 테스트 환경을 위해 임시로 prod 환경에서 비활성화
*/
@Component
@RequiredArgsConstructor
@Slf4j
@Profile({"perf", "prod"})
@Profile({"perf"})
public class QueueExpireScheduler {

private static final String JOB_NAME = "QueueExpire";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
/*
* 대기열 조회 로직
* Redis 우선 조회 -> DB 조회
* TODO 시간 계산 로직 수정
*/
@Service
@RequiredArgsConstructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ public ApiResponse<QrTokenResponse> generateQrToken(
return ApiResponse.ok("QR 토큰 발급 성공", response);
}

//TODO 관리자 전용 API로 변경 고려
@Override
@PostMapping("/entry/verify")
public ApiResponse<QrValidationResponse> validateQrCode(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ private QrTokenClaims validateAndParseQrToken(String qrToken) {
Long userId = getLongValue(payload, CLAIM_USER_ID);
Long issuedAt = getLongValue(payload, CLAIM_IAT);

// TODO -> 2중 체크 로직 제거 고려
// 토큰 기간 확인 -> 60초 이상이면 만료
long now = Instant.now().getEpochSecond();
if(now - issuedAt > QR_TOKEN_VALIDATE_SECEONDS) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import lombok.Getter;
import lombok.NoArgsConstructor;

//TODO: User 엔티티쪽에 Cascade 설정 해줘야 함
@Entity
@Builder
@Getter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ public enum PreRegisterStatus {
@Schema(description = "사전등록 취소")
CANCELED

//큐로 넘어가는 상태값
}
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public void moveToEnteredQueue(Long eventId, Long userId) {
String key = String.format(ENTERED_KEY, eventId);
redisTemplate.opsForSet().add(key, userId.toString());

//redisTemplate.expire(key, java.time.Duration.ofMinutes(15)); //TTL 15분 TODO 주석 해제
//redisTemplate.expire(key, java.time.Duration.ofMinutes(15)); //TTL 15분 TODO 주석 해제. 테스트를 위해 임시 주석 처리
log.info("Moved user to entered queue - eventId: {}, userId: {}", eventId, userId);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class Seat extends BaseEntity {

@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "event_id", nullable = false)
private Event event; // TODO: 실제 Event 엔티티로 변경 필요
private Event event;

@Column(nullable = false, name = "seat_code")
private String seatCode; // 예시) "A1", "B2"
Expand Down
137 changes: 0 additions & 137 deletions backend/src/main/java/com/back/global/init/QueueEntryDataInit.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
public class QueueSchedulerProperties {

private Entry entry = new Entry();
private Shuffle shuffle = new Shuffle();

@Getter
@Setter
Expand All @@ -23,11 +22,4 @@ public static class Entry {
private int maxEnteredLimit;
}

@Getter
@Setter
public static class Shuffle {
private String cron;
private int timeRangeMinutes;
}

}
11 changes: 0 additions & 11 deletions backend/src/main/resources/application-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,20 +82,9 @@ queue:
batch-size: 100 # 한 번에 입장시킬 인원
max-entered-limit: 100 # 최대 수용 인원

#셔플 처리 스케줄러
shuffle:
cron: "*/30 * * * * *" # 테스트를 위해 30초마다 실행
#cron: "0 */10 * * * *" # 10분마다 실행
time-range-minutes: 1 # 시간 범위

expire:
cron: "0 * * * * *"

event:
scheduler:
open:
cron: "0 * * * * *"

# Actuator/micrometer/prometheus 설정
management:
endpoints:
Expand Down
8 changes: 1 addition & 7 deletions backend/src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,10 @@ management:
health:
show-details: never

# TODO: 프론트 완료 후 아래 주석처리 한 걸로 교체
cookie:
secure: true
same-site: None
domain: ""

#cookie:
# secure: true
# same-site: None
# domain: ".waitfair.shop"
domain: ".waitfair.shop"

# coolSMS
sms:
Expand Down
12 changes: 0 additions & 12 deletions backend/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ spring:
import: optional:file:.env.properties
profiles:
active: dev
include: secret
jackson:
time-zone: Asia/Seoul
output:
Expand Down Expand Up @@ -144,20 +143,9 @@ queue:
batch-size: 50 # 한 번에 입장시킬 인원 100
max-entered-limit: 100 # 최대 수용 인원

#셔플 처리 스케줄러
shuffle:
cron: "*/30 * * * * *" # 테스트를 위해 30초마다 실행
#cron: "0 */10 * * * *" # 10분마다 실행
time-range-minutes: 1 # 시간 범위

expire:
cron: "0 * * * * *"

event:
scheduler:
open:
cron: "0 * * * * *"

# Actuator/micrometer/prometheus 설정
management:
endpoints:
Expand Down