aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorArun Isaac2023-12-29 18:55:37 +0000
committerArun Isaac2023-12-29 19:01:46 +0000
commit204a308be0f741726b9a620d88fbc22b22124c81 (patch)
treeb3cf66906674020b530c844c2bb4982c8a0e2d39 /bin
parent83062c75442160427b50420161bfcae2c5c34c84 (diff)
downloadgenenetwork2-204a308be0f741726b9a620d88fbc22b22124c81.tar.gz
Namespace all modules under gn2.
We move all modules under a gn2 directory. This is important for "correct" packaging and deployment as a Guix service.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/genenetwork216
1 files changed, 4 insertions, 12 deletions
diff --git a/bin/genenetwork2 b/bin/genenetwork2
index a03ad6ef..09b3415e 100755
--- a/bin/genenetwork2
+++ b/bin/genenetwork2
@@ -159,8 +159,6 @@ 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} ${*}"
@@ -170,7 +168,6 @@ 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