about summary refs log tree commit diff
path: root/bin
diff options
context:
space:
mode:
authorAlexander_Kabui2024-01-02 13:21:07 +0300
committerAlexander_Kabui2024-01-02 13:21:07 +0300
commit70c4201b332e0e2c0d958428086512f291469b87 (patch)
treeaea4fac8782c110fc233c589c3f0f7bd34bada6c /bin
parent5092eb42f062b1695c4e39619f0bd74a876cfac2 (diff)
parent965ce5114d585624d5edb082c710b83d83a3be40 (diff)
downloadgenenetwork2-70c4201b332e0e2c0d958428086512f291469b87.tar.gz
merge changes
Diffstat (limited to 'bin')
-rwxr-xr-xbin/genenetwork222
1 files changed, 7 insertions, 15 deletions
diff --git a/bin/genenetwork2 b/bin/genenetwork2
index a03ad6ef..2ac83c7f 100755
--- a/bin/genenetwork2
+++ b/bin/genenetwork2
@@ -159,18 +159,15 @@ set|grep TMPDIR
 
 # Now handle command parameter -c which runs python
 if [ "$1" = '-c' ] ; then
-    cd "${GN2_BASE_DIR}/wqflask"
-    cmd=${2#wqflask/}
     echo PYTHONPATH="${PYTHONPATH}"
-    shift ; shift
-    echo "RUNNING COMMAND ${cmd} ${*}"
-    python $cmd $*
+    shift
+    echo "RUNNING COMMAND python ${*}"
+    python $*
     exit $?
 fi
 
 # Now handle command parameter -cli which runs in bash
 if [ "$1" = "-cli" ] ; then
-    cd "${GN2_BASE_DIR}/wqflask"
     cmd=$2
     echo PYTHONPATH="${PYTHONPATH}"
     shift ; shift
@@ -179,7 +176,6 @@ if [ "$1" = "-cli" ] ; then
     exit $?
 fi
 if [ "$1" = '-gunicorn' ] ; then
-    cd "${GN2_BASE_DIR}/wqflask"
     cmd=$2
     echo PYTHONPATH="${PYTHONPATH}"
     echo "RUNNING gunicorn ${cmd}"
@@ -187,20 +183,18 @@ if [ "$1" = '-gunicorn' ] ; then
     exit $?
 fi
 if [ "$1" = '-gunicorn-dev' ] ; 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=1 --timeout 180 --reload run_gunicorn:app"
+    cmd="--bind 0.0.0.0:$SERVER_PORT --workers=1 --timeout 180 --reload gn2.run_gunicorn:app"
     echo "RUNNING gunicorn ${cmd}"
     gunicorn $cmd
     exit $?
 fi
 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
     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 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 gn2.wsgi"
     echo "RUNNING gunicorn ${cmd}"
     gunicorn $cmd
     exit $?
@@ -219,16 +213,14 @@ fi
 
 
 if [ "$1" = "--with-pdb" ] ; then
-    cd "${GN2_BASE_DIR}/wqflask"
     cmd=$2
     echo PYTHONPATH="${PYTHONPATH}"
     shift ; shift
-    echo "RUNNING COMMAND python3 -m runserver.py"
+    echo "RUNNING COMMAND python3 -m gn2.runserver.py"
     python3 -m pdb runserver.py
     exit $?
 fi
 
 # Start the flask server running GN2
-cd "${GN2_BASE_DIR}/wqflask"
 echo "Starting with $settings"
-python runserver.py
+python gn2.runserver.py