feat add connections management and health summary improvements
This commit is contained in:
6
run.sh
6
run.sh
@@ -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 ..
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user