Skip to content

Commit 1da2445

Browse files
authored
Merge pull request #60 from CommitField/feature/#6
style : actuator ์ฃผ์„ ์ถ”๊ฐ€ (#6)
2 parents 6665dec + 43db8ae commit 1da2445

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

โ€Žbuild.gradle.kts

+3-1
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,12 @@ dependencies {
4646
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
4747

4848
//redis
49-
implementation("org.springframework.boot:spring-boot-starter-actuator")
5049
implementation("org.springframework.boot:spring-boot-starter-data-redis")
5150
implementation("org.springframework.session:spring-session-data-redis")
5251

52+
// actuator
53+
implementation("org.springframework.boot:spring-boot-starter-actuator")
54+
5355
// Security
5456
implementation("org.springframework.boot:spring-boot-starter-security")
5557
testImplementation("org.springframework.security:spring-security-test")

โ€ŽinfraScript/zero_downtime_deploy.py

+9-2
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,15 @@ def _is_service_up(self, port: int) -> bool:
6969
response = requests.get(url, timeout=5) # 5์ดˆ ์ด๋‚ด ์‘๋‹ต ์—†์œผ๋ฉด ์˜ˆ์™ธ ๋ฐœ์ƒ
7070
if response.status_code == 200 and response.json().get('status') == 'UP':
7171
return True
72-
except requests.RequestException:
73-
pass
72+
except requests.RequestException as e:
73+
print(f"Request failed: {e}")
74+
# `response` ๊ฐ์ฒด๊ฐ€ ์กด์žฌํ•œ๋‹ค๋ฉด ์‘๋‹ต ๋ณธ๋ฌธ ์ถœ๋ ฅ
75+
if 'response' in locals():
76+
print(f"Invalid JSON response: {response.text}")
77+
else:
78+
print("No response received.")
79+
except ValueError as e:
80+
print(f"JSON parsing failed: {e}")
7481
return False
7582

7683
# ์„œ๋น„์Šค๋ฅผ ์—…๋ฐ์ดํŠธํ•˜๋Š” ํ•จ์ˆ˜

0 commit comments

Comments
ย (0)