mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-13 08:15:21 +02:00
Just Fixes
This commit is contained in:
parent
acc2ef9e96
commit
348bc2d1d3
8 changed files with 514 additions and 14 deletions
|
|
@ -27,7 +27,7 @@ if (-not (Get-Command $PythonBin -ErrorAction SilentlyContinue)) {
|
|||
exit 1
|
||||
}
|
||||
|
||||
$PyMajMin = & $PythonBin -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")'
|
||||
$PyMajMin = & $PythonBin -c 'import sys; print(sys.version_info.major, sys.version_info.minor, sep=chr(46))'
|
||||
if ($PyMajMin -ne '3.12' -and $PyMajMin -ne '3.13') {
|
||||
$PyPath = (Get-Command $PythonBin).Source
|
||||
Write-Error "Python 3.12 or 3.13 required, found $PyMajMin at $PyPath. Activate a venv built with python3.12 or python3.13 and retry."
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ if (Test-Path $EnvFile) {
|
|||
if (-not $env:UVICORN_BASE_PORT) { $env:UVICORN_BASE_PORT = '8000' }
|
||||
|
||||
$HealthEndpoint = '/api/v1/health'
|
||||
$HealthMaxAttempts = if ($env:HEALTH_MAX_ATTEMPTS) { [int]$env:HEALTH_MAX_ATTEMPTS } else { 30 }
|
||||
$HealthMaxAttempts = if ($env:HEALTH_MAX_ATTEMPTS) { [int]$env:HEALTH_MAX_ATTEMPTS } else { 120 }
|
||||
$HealthInterval = if ($env:HEALTH_INTERVAL) { [int]$env:HEALTH_INTERVAL } else { 2 }
|
||||
|
||||
###############################################################################
|
||||
|
|
@ -143,7 +143,7 @@ Write-Host "Waiting for uvicorn health check at $healthUrl ..."
|
|||
$healthy = $false
|
||||
for ($attempt = 1; $attempt -le $HealthMaxAttempts; $attempt++) {
|
||||
try {
|
||||
$resp = Invoke-WebRequest -Uri $healthUrl -UseBasicParsing -TimeoutSec 2 -ErrorAction Stop
|
||||
$resp = Invoke-WebRequest -Uri $healthUrl -UseBasicParsing -TimeoutSec 10 -ErrorAction Stop
|
||||
if ($resp.StatusCode -eq 200) {
|
||||
Write-Host "OK uvicorn healthy (attempt $attempt)"
|
||||
$healthy = $true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue