aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorPjotr Prins2018-02-11 11:37:36 +0000
committerPjotr Prins2018-02-11 11:37:36 +0000
commit018c9d6c50e90d783bc7bd1b2a0d85b080ebf394 (patch)
treece412a7f2efacbf676dc524a114334f1a2408702 /bin
parent7f3a493db99998992f86af9a5e333103f255be6d (diff)
downloadgenenetwork2-018c9d6c50e90d783bc7bd1b2a0d85b080ebf394.tar.gz
Added gunicorn pid so we can not run twice
Diffstat (limited to 'bin')
-rwxr-xr-xbin/genenetwork24
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/genenetwork2 b/bin/genenetwork2
index 2f0b841e..8886e4bc 100755
--- a/bin/genenetwork2
+++ b/bin/genenetwork2
@@ -192,8 +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 -k eventlet --workers 20 --keep-alive 1200 --max-requests 1000 --timeout 1200 wsgi"
- # cmd="--bind 0.0.0.0:$SERVER_PORT --workers 20 --keep-alive 75 --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 $?