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
4 changes: 3 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,12 @@ dependencies {
implementation("org.springframework.boot:spring-boot-starter-data-jpa")

//redis
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("org.springframework.boot:spring-boot-starter-data-redis")
implementation("org.springframework.session:spring-session-data-redis")

// actuator
implementation("org.springframework.boot:spring-boot-starter-actuator")

// Security
implementation("org.springframework.boot:spring-boot-starter-security")
testImplementation("org.springframework.security:spring-security-test")
Expand Down
11 changes: 9 additions & 2 deletions infraScript/zero_downtime_deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,15 @@ def _is_service_up(self, port: int) -> bool:
response = requests.get(url, timeout=5) # 5초 이내 응답 없으면 예외 발생
if response.status_code == 200 and response.json().get('status') == 'UP':
return True
except requests.RequestException:
pass
except requests.RequestException as e:
print(f"Request failed: {e}")
# `response` 객체가 존재한다면 응답 본문 출력
if 'response' in locals():
print(f"Invalid JSON response: {response.text}")
else:
print("No response received.")
except ValueError as e:
print(f"JSON parsing failed: {e}")
return False

# 서비스를 업데이트하는 함수
Expand Down