feat add connections management and health summary improvements

This commit is contained in:
2026-03-15 16:40:43 +03:00
parent eba0fab091
commit 027d17f193
17 changed files with 8521 additions and 10819 deletions

6
run.sh
View File

@@ -192,13 +192,17 @@ trap cleanup SIGINT
start_backend() {
echo -e "\033[0;34m[Backend]\033[0m Starting on port $BACKEND_PORT..."
cd backend
local -a uvicorn_env_args=()
if [ -f ".venv/bin/activate" ]; then
source .venv/bin/activate
else
echo -e "\033[0;31m[Backend]\033[0m Warning: .venv/bin/activate not found. Attempting to run without venv."
fi
if [ -f ".env" ]; then
uvicorn_env_args=(--env-file .env)
fi
# Use a subshell to prefix output
python3 -m uvicorn src.app:app --reload --port "$BACKEND_PORT" 2>&1 | sed "s/^/$(echo -e '\033[0;34m[Backend]\033[0m ') /" &
python3 -m uvicorn src.app:app --reload --port "$BACKEND_PORT" "${uvicorn_env_args[@]}" 2>&1 | sed "s/^/$(echo -e '\033[0;34m[Backend]\033[0m ') /" &
BACKEND_PID=$!
cd ..
}