Skip to content

Commit

Permalink
feat - set async workers (#452)
Browse files Browse the repository at this point in the history
## Changes
- set uvicorn workers, default 1
  • Loading branch information
Ilevk authored Sep 21, 2024
1 parent 2a0f3b7 commit a189c87
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/app-start.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash

export PORT=${PORT:-8000}
export WORKERS=${WORKERS:-1}

NUMREGEX="^[0-9]+$"
GRACEFUL_SHUTDOWN_PERIOD_SECONDS=3600
Expand All @@ -25,7 +26,8 @@ ${OPTIONAL_TIMEOUT} \
uvicorn prepline_general.api.app:app \
--log-config logger_config.yaml \
--host 0.0.0.0 \
--port "$PORT"
--port "$PORT" \
--workers "$WORKERS" \

echo "Server was shutdown"
[ -n "$MAX_LIFETIME_SECONDS" ] && echo "Reached timeout of $MAX_LIFETIME_SECONDS seconds"

0 comments on commit a189c87

Please sign in to comment.