aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorzsloan2018-02-12 11:03:01 -0600
committerGitHub2018-02-12 11:03:01 -0600
commite8353466b9e1a90bc4ba6336532c743ae4b10fd2 (patch)
treece412a7f2efacbf676dc524a114334f1a2408702 /bin
parent4ae2d548127eeeaa7cec0baf1b788005b5e8e51d (diff)
parent018c9d6c50e90d783bc7bd1b2a0d85b080ebf394 (diff)
downloadgenenetwork2-e8353466b9e1a90bc4ba6336532c743ae4b10fd2.tar.gz
Merge pull request #277 from pjotrp/gn-production
Gn production
Diffstat (limited to 'bin')
-rwxr-xr-xbin/genenetwork28
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/genenetwork2 b/bin/genenetwork2
index f64576d5..8886e4bc 100755
--- a/bin/genenetwork2
+++ b/bin/genenetwork2
@@ -45,6 +45,7 @@
SCRIPT=$(realpath "$0")
echo SCRIPT=$SCRIPT
+echo GN2_PROFILE=$GN2_PROFILE
GN2_BASE_DIR=$(dirname $(dirname "$SCRIPT"))
GN2_ID=$(cat /etc/hostname):$(basename $GN2_BASE_DIR)
@@ -120,7 +121,9 @@ else
export PLINK_COMMAND="$GN2_PROFILE/bin/plink2"
export PYLMM_COMMAND="$GN2_PROFILE/bin/pylmm_redis"
export GEMMA_COMMAND="$GN2_PROFILE/bin/gemma"
- export GEMMA_WRAPPER_COMMAND="$GN2_PROFILE/bin/gemma-wrapper"
+ if [ -z $GEMMA_WRAPPER_COMMAND ]; then
+ export GEMMA_WRAPPER_COMMAND="$GN2_PROFILE/bin/gemma-wrapper"
+ fi
if [ ! -d $PYTHONPATH ] ; then echo "PYTHONPATH not valid "$PYTHONPATH ; exit 1 ; fi
if [ ! -d $R_LIBS_SITE ] ; then echo "R_LIBS_SITE not valid "$R_LIBS_SITE ; exit 1 ; fi
if [ ! -d $GEM_PATH ] ; then echo "GEM_PATH not valid "$GEM_PATH ; exit 1 ; fi
@@ -189,7 +192,8 @@ if [ "$1" = '-gunicorn-prod' ] ; then
cd $GN2_BASE_DIR/wqflask
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=32 --max-requests 1000 --timeout 1200 wsgi"
+ PID=$TMPDIR/gunicorn.$USER.pid
+ cmd="--bind 0.0.0.0:$SERVER_PORT --pid $PID -k eventlet --workers 20 --keep-alive 1200 --max-requests 1000 --timeout 1200 wsgi"
echo RUNNING gunicorn $cmd
gunicorn $cmd
exit $?