Skip to content

Commit a189c87

Browse files
authored
feat - set async workers (#452)
## Changes - set uvicorn workers, default 1
1 parent 2a0f3b7 commit a189c87

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scripts/app-start.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env bash
22

33
export PORT=${PORT:-8000}
4+
export WORKERS=${WORKERS:-1}
45

56
NUMREGEX="^[0-9]+$"
67
GRACEFUL_SHUTDOWN_PERIOD_SECONDS=3600
@@ -25,7 +26,8 @@ ${OPTIONAL_TIMEOUT} \
2526
uvicorn prepline_general.api.app:app \
2627
--log-config logger_config.yaml \
2728
--host 0.0.0.0 \
28-
--port "$PORT"
29+
--port "$PORT" \
30+
--workers "$WORKERS" \
2931

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

0 commit comments

Comments
 (0)