Switch from Paste for serving to Waitress

Incredibly, it looks like none of our documentation has to change taking
this route...!
This commit is contained in:
Christopher Allan Webber
2016-02-17 17:39:32 -08:00
parent 149f46f7d5
commit d61778a489
6 changed files with 17 additions and 85 deletions

View File

@@ -19,34 +19,9 @@
selfname=$(basename "$0")
local_bin="./bin"
# Test whether or not gunicorn is installed
# -----------------------------------------
if [ -f "${local_bin}/python" ]; then
our_python="${local_bin}/python";
else
our_python="python";
fi
if $our_python -c "import sys
try:
import gunicorn
sys.exit(0)
except ImportError:
sys.exit(1)
"; then
use_gunicorn=true;
else
use_gunicorn=false;
fi
# -----------------------------------------
case "$selfname" in
lazyserver.sh)
if $use_gunicorn; then
starter_cmd=gunicorn;
else
starter_cmd=paster;
fi
starter_cmd=paster;
ini_prefix=paste
;;
lazycelery.sh)
@@ -62,14 +37,9 @@ esac
if [ "$1" = "-h" ]; then
echo "$0 [-h] [-c filename.ini] [ARGS_to_${starter_cmd} ...]"
echo ""
if $use_gunicorn; then
echo " For Gunicorn settings, see at:"
echo " http://docs.gunicorn.org/en/19.0/settings.html"
else
echo " For example:"
echo " $0 -c fcgi.ini port_number=23371"
echo " or: $0 --server-name=fcgi --log-file=paste.log"
fi
echo " For example:"
echo " $0 -c fcgi.ini port_number=23371"
echo " or: $0 --server-name=fcgi --log-file=paste.log"
echo ""
echo " The configfile defaults to ${ini_prefix}_local.ini,"
echo " if that is readable, otherwise ${ini_prefix}.ini."
@@ -112,11 +82,7 @@ set -x
export CELERY_ALWAYS_EAGER=true
case "$selfname" in
lazyserver.sh)
if $use_gunicorn; then
$starter --paste "$ini_file" --log-file=- $@;
else
$starter serve "$ini_file" "$@" --reload;
fi
$starter serve "$ini_file" "$@" --reload;
;;
lazycelery.sh)
MEDIAGOBLIN_CONFIG="${ini_file}" \