diff options
author | Frederick Muriuki Muriithi | 2024-04-24 06:45:47 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2024-04-24 06:45:47 +0300 |
commit | 72acd0388ef45dd35a4b933bc80bb277c7a8f567 (patch) | |
tree | 104858e20228a732f5b4d630af394660ec320e14 | |
parent | 612a729a4b6cd8e93602a15916c479c53c1cd2d7 (diff) | |
download | genenetwork2-72acd0388ef45dd35a4b933bc80bb277c7a8f567.tar.gz |
Provide a way to pass extra arguments to gunicorn
-rwxr-xr-x | bin/genenetwork2 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/genenetwork2 b/bin/genenetwork2 index da35d049..fc14eedc 100755 --- a/bin/genenetwork2 +++ b/bin/genenetwork2 @@ -186,7 +186,7 @@ fi if [ "$1" = '-gunicorn-dev' ] ; then echo PYTHONPATH="${PYTHONPATH}" if [ -z "${SERVER_PORT}" ]; then echo "ERROR: Provide a SERVER_PORT" ; exit 1 ; fi - cmd="--bind 0.0.0.0:$SERVER_PORT --workers=1 --timeout 180 --reload gn2.run_gunicorn:app" + cmd="--bind 0.0.0.0:$SERVER_PORT --workers=1 --timeout 180 --reload ${GUNICORN_EXTRA_ARGS} gn2.run_gunicorn:app" echo "RUNNING gunicorn ${cmd}" gunicorn $cmd exit $? @@ -195,7 +195,7 @@ if [ "$1" = '-gunicorn-prod' ] ; then echo PYTHONPATH="${PYTHONPATH}" if [ -z "${SERVER_PORT}" ]; then echo "ERROR: Provide a SERVER_PORT" ; exit 1 ; fi PID=$TMPDIR/gunicorn.$USER.pid - cmd="--bind 0.0.0.0:$SERVER_PORT --pid $PID --workers 20 --keep-alive 6000 --max-requests 100 --max-requests-jitter 30 --timeout 1200 gn2.wsgi" + cmd="--bind 0.0.0.0:$SERVER_PORT --pid $PID --workers 20 --keep-alive 6000 --max-requests 100 --max-requests-jitter 30 --timeout 1200 ${GUNICORN_EXTRA_ARGS} gn2.wsgi" echo "RUNNING gunicorn ${cmd}" gunicorn $cmd exit $? |