Skip to content

Commit

Permalink
fix : 숨은캐스퍼찾기 게임 마지막날 일 때 인덱스 에러 해결 (hotfix-1)
Browse files Browse the repository at this point in the history
  • Loading branch information
putdata committed Aug 25, 2024
1 parent c794557 commit f3e89c4
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,13 @@ public StartGameResponseDto startFindingGame() {

HashMap<String, String> infoHashMap = new HashMap<>();

//TODO: nextGameIndex == -1 이면 에러 수정
FindingGameDailyInfo nextGameInfo = dto.findingGameInfos().get(nextGameIndex);
LocalDateTime nowTime = LocalDateTime.now(clock);
// 캐싱으로 인해 다음 게임이 이미 시작된 경우를 확인
if (nextGameInfo.startTime().isBefore(nowTime) && nextGameInfo.endTime().isBefore(nowTime)) {
recentGameIndex = nextGameIndex;
if (nextGameIndex != -1) {
FindingGameDailyInfo nextGameInfo = dto.findingGameInfos().get(nextGameIndex);
// 캐싱으로 인해 다음 게임이 이미 시작된 경우를 확인
if (nextGameInfo.startTime().isBefore(nowTime) && nextGameInfo.endTime().isBefore(nowTime)) {
recentGameIndex = nextGameIndex;
}
}

FindingGameDailyInfo gameInfo = dto.findingGameInfos().get(recentGameIndex);
Expand Down
6 changes: 5 additions & 1 deletion src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
#
spring:
jpa:
properties:
hibernate:
show_sql: true
6 changes: 6 additions & 0 deletions src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ spring:
bucket: ${S3_BUCKET}
region:
static: ${REGION}

management:
endpoints:
web:
exposure:
include: "prometheus"
8 changes: 1 addition & 7 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spring:
ddl-auto: update
properties:
hibernate:
show_sql: true
show_sql: false
format_sql: true
highlight_sql: true
database-platform: org.hibernate.dialect.MySQLDialect
Expand Down Expand Up @@ -38,12 +38,6 @@ logging:
pattern:
dateformat: yyyy-MM-dd HH:mm:ss.SSSz,Asia/Seoul # 로그 시간 설정

management:
endpoints:
web:
exposure:
include: "prometheus"

images:
preview: ${PREVIEW_IMAGE}

0 comments on commit f3e89c4

Please sign in to comment.