feat: 운영 안정성과 세션 음성 경험 개선
This commit is contained in:
parent
facc4ad2d9
commit
c788343467
95 changed files with 8431 additions and 1785 deletions
|
|
@ -110,7 +110,7 @@ $checks = @(
|
|||
(Test-JsonHealth `
|
||||
-Name "api" `
|
||||
-Uri "http://127.0.0.1:$ApiPort/health" `
|
||||
-IsHealthy { param($health) $health.environment -eq "prod" -and $health.db -and $health.engine }),
|
||||
-IsHealthy { param($health) $health.environment -eq "prod" -and $health.db }),
|
||||
(Test-JsonHealth `
|
||||
-Name "web-preview" `
|
||||
-Uri "http://127.0.0.1:$WebPort/" `
|
||||
|
|
@ -122,13 +122,13 @@ if (!$SkipPublicHealth) {
|
|||
$checks += Test-JsonHealth `
|
||||
-Name "public-api" `
|
||||
-Uri $PublicHealthUrl `
|
||||
-IsHealthy { param($health) $health.environment -eq "prod" -and $health.db -and $health.engine } `
|
||||
-IsHealthy { param($health) $health.environment -eq "prod" -and $health.db } `
|
||||
-TimeoutSec 30
|
||||
foreach ($url in $AdditionalPublicHealthUrls) {
|
||||
$checks += Test-JsonHealth `
|
||||
-Name "public-api:$url" `
|
||||
-Uri $url `
|
||||
-IsHealthy { param($health) $health.environment -eq "prod" -and $health.db -and $health.engine } `
|
||||
-IsHealthy { param($health) $health.environment -eq "prod" -and $health.db } `
|
||||
-TimeoutSec 30
|
||||
}
|
||||
}
|
||||
|
|
@ -164,6 +164,9 @@ $startArgs = @{
|
|||
Cloudflared = $Cloudflared
|
||||
CloudflaredConfig = $CloudflaredConfig
|
||||
}
|
||||
if (($checks | Where-Object { $_.Name -eq "web-preview" }).Ok) {
|
||||
$startArgs["SkipWebRestart"] = $true
|
||||
}
|
||||
if ($SkipCloudflaredRestart) {
|
||||
$startArgs["SkipCloudflaredRestart"] = $true
|
||||
}
|
||||
|
|
@ -180,7 +183,7 @@ try {
|
|||
$apiAfter = Test-JsonHealth `
|
||||
-Name "api" `
|
||||
-Uri "http://127.0.0.1:$ApiPort/health" `
|
||||
-IsHealthy { param($health) $health.environment -eq "prod" -and $health.db -and $health.engine } `
|
||||
-IsHealthy { param($health) $health.environment -eq "prod" -and $health.db } `
|
||||
-TimeoutSec 20
|
||||
if (!$apiAfter.Ok) {
|
||||
throw "Public API still unhealthy after restart: $($apiAfter.Detail)"
|
||||
|
|
@ -195,11 +198,20 @@ if (!$webAfter.Ok) {
|
|||
throw "Public web preview still unhealthy after restart: $($webAfter.Detail)"
|
||||
}
|
||||
|
||||
$engineAfter = Test-JsonHealth `
|
||||
-Name "engine" `
|
||||
-Uri "http://127.0.0.1:$EnginePort/health" `
|
||||
-IsHealthy { param($health) $health.ok -eq $true } `
|
||||
-TimeoutSec 20
|
||||
if (!$engineAfter.Ok) {
|
||||
throw "Engine gateway still unhealthy after isolated restart: $($engineAfter.Detail)"
|
||||
}
|
||||
|
||||
if (!$SkipPublicHealth) {
|
||||
$publicAfter = Test-JsonHealth `
|
||||
-Name "public-api" `
|
||||
-Uri $PublicHealthUrl `
|
||||
-IsHealthy { param($health) $health.environment -eq "prod" -and $health.db -and $health.engine } `
|
||||
-IsHealthy { param($health) $health.environment -eq "prod" -and $health.db } `
|
||||
-TimeoutSec 30
|
||||
if (!$publicAfter.Ok) {
|
||||
throw "Public API tunnel still unhealthy after restart: $($publicAfter.Detail)"
|
||||
|
|
@ -208,7 +220,7 @@ if (!$SkipPublicHealth) {
|
|||
$publicExtraAfter = Test-JsonHealth `
|
||||
-Name "public-api:$url" `
|
||||
-Uri $url `
|
||||
-IsHealthy { param($health) $health.environment -eq "prod" -and $health.db -and $health.engine } `
|
||||
-IsHealthy { param($health) $health.environment -eq "prod" -and $health.db } `
|
||||
-TimeoutSec 30
|
||||
if (!$publicExtraAfter.Ok) {
|
||||
throw "Public API tunnel still unhealthy after restart: $($publicExtraAfter.Detail)"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue