diff --git a/scripts/start.sh b/scripts/start.sh index aedcca2202..b4990d3852 100755 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -5,9 +5,18 @@ set -e CUR_DIR=$(cd "$(dirname "$0")" && pwd) BASE_DIR=$(dirname "$CUR_DIR") +min() { + echo $(( $1 < $2 ? $1 : $2 )) +} + +workers=$(min 30 ${NB_WORKERS_ANTARES:-17}) # default to 17 and max is 30 + if [ -z "$1" ] ; then sh $CUR_DIR/pre-start.sh - gunicorn --config $BASE_DIR/conf/gunicorn.py --worker-class=uvicorn.workers.UvicornWorker antarest.wsgi:app + for ((i=0; i