Refactor Vosk service startup script to use start_with_deps.sh for both async and Gunicorn modes

This commit is contained in:
Alireza
2025-08-02 17:59:14 +03:30
parent cfe2b2346a
commit 896831aa46
5 changed files with 171 additions and 2 deletions

View File

@@ -48,13 +48,13 @@ if ! curl -s http://localhost:5000/ > /dev/null; then
# Choose between async and production mode
if [ "$USE_ASYNC" = "true" ]; then
export USE_ASYNC=true
python start_service.py &
./start_with_deps.sh &
VOSK_PID=$!
echo "✅ Vosk async service started with PID: $VOSK_PID"
else
# Use Gunicorn for production multiprocessing
export USE_GUNICORN=true
gunicorn -c gunicorn_config.py app_optimized:app &
./start_with_deps.sh &
VOSK_PID=$!
echo "✅ Vosk Gunicorn service started with PID: $VOSK_PID"
fi