Move gunicorn to regular requirements (not just dev) and add uvloop.

Swap circusd for gravity to start dev-mode/run.sh Galaxy.
This commit is contained in:
Nate Coraor
2022-01-21 13:29:14 -05:00
parent a53ef1888d
commit c9cf15576c
6 changed files with 13 additions and 65 deletions
-14
View File
@@ -1,14 +0,0 @@
[env]
PYTHONPATH = lib
[watcher:celery]
cmd = celery
args = --app galaxy.celery worker --concurrency 2 -l debug
copy_env = True
numprocesses = 1
[watcher:celery-beat]
cmd = celery
args = --app galaxy.celery beat -l debug
copy_env = True
numprocesses = 1
-28
View File
@@ -1,28 +0,0 @@
[circus]
debug = True
include = celery.ini
[env]
PYTHONPATH=lib
[watcher:web]
cmd = gunicorn 'galaxy.webapps.galaxy.fast_factory:factory()' --timeout 300 --pythonpath lib -k galaxy.webapps.galaxy.workers.Worker -b fd://$(circus.sockets.web)
send_hup = true
numprocesses = 1
use_sockets = True
stop_signal = TERM
stop_children = True
copy_env = True
[watcher:client]
working_dir = client
cmd = yarn watch
numprocesses = 1
singleton = True
copy_env = True
stop_signal = TERM
stop_children = True
[socket:web]
host = 0.0.0.0
port = 8080
@@ -64,6 +64,7 @@ fs==2.4.14
funcsigs==1.0.2
future==0.18.2; (python_version >= "2.6" and python_full_version < "3.0.0") or (python_full_version >= "3.3.0")
galaxy-sequence-utils==1.1.5
gravity==0.10.0
greenlet==1.1.2; python_version >= "3" and python_full_version < "3.0.0" and (platform_machine == "aarch64" or platform_machine == "ppc64le" or platform_machine == "x86_64" or platform_machine == "amd64" or platform_machine == "AMD64" or platform_machine == "win32" or platform_machine == "WIN32") and (python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0") and (python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.6" and python_version < "4.0" and python_full_version >= "3.6.0") or python_version >= "3" and (platform_machine == "aarch64" or platform_machine == "ppc64le" or platform_machine == "x86_64" or platform_machine == "amd64" or platform_machine == "AMD64" or platform_machine == "win32" or platform_machine == "WIN32") and (python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0") and (python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.6" and python_version < "4.0" and python_full_version >= "3.6.0") and python_full_version >= "3.5.0"
gunicorn==20.1.0; python_version >= "3.5"
gxformat2==0.15.0
@@ -218,6 +219,7 @@ tzlocal==2.1; python_version >= "2.7" and python_full_version < "3.0.0" or pytho
ubiquerg==0.6.2
urllib3==1.26.8; python_version >= "3.7" and python_full_version < "3.0.0" and python_version < "4" or python_full_version >= "3.6.0" and python_version < "4" and python_version >= "3.7"
uvicorn==0.16.0
uvloop==0.16.0
vine==5.0.0; python_version >= "3.7"
watchdog==2.1.6; python_version >= "3.6"
wcwidth==0.2.5; python_full_version >= "3.6.2" and python_version >= "3.7"
@@ -55,7 +55,9 @@ fs==2.4.14
funcsigs==1.0.2
future==0.18.2; (python_version >= "2.6" and python_full_version < "3.0.0") or (python_full_version >= "3.3.0")
galaxy-sequence-utils==1.1.5
gravity==0.10.0
greenlet==1.1.2; python_version >= "3" and python_full_version < "3.0.0" and (platform_machine == "aarch64" or platform_machine == "ppc64le" or platform_machine == "x86_64" or platform_machine == "amd64" or platform_machine == "AMD64" or platform_machine == "win32" or platform_machine == "WIN32") and (python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0") and (python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.6" and python_version < "4.0" and python_full_version >= "3.6.0") or python_version >= "3" and (platform_machine == "aarch64" or platform_machine == "ppc64le" or platform_machine == "x86_64" or platform_machine == "amd64" or platform_machine == "AMD64" or platform_machine == "win32" or platform_machine == "WIN32") and (python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0") and (python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.6" and python_version < "4.0" and python_full_version >= "3.6.0") and python_full_version >= "3.5.0"
gunicorn==20.1.0; python_version >= "3.5"
gxformat2==0.15.0
h11==0.12.0; python_version >= "3.6"
h5py==3.6.0; python_version >= "3.7"
@@ -155,6 +157,7 @@ tzlocal==2.1; python_version >= "2.7" and python_full_version < "3.0.0" or pytho
ubiquerg==0.6.2
urllib3==1.26.8; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4" or python_full_version >= "3.6.0" and python_version < "4" and python_version >= "3.6"
uvicorn==0.16.0
uvloop==0.16.0
vine==5.0.0; python_version >= "3.7"
wcwidth==0.2.5; python_full_version >= "3.6.2" and python_version >= "3.7"
webencodings==0.5.1; python_version >= "3.6"
+3 -1
View File
@@ -38,6 +38,8 @@ fastapi-utils = "*"
fs = "*"
future = "*"
galaxy_sequence_utils = "*"
gravity = ">=0.10.0"
gunicorn = "*"
gxformat2 = "*"
h5py = "*"
importlib_resources = "*"
@@ -82,6 +84,7 @@ tifffile = "*"
tuswsgi = "*"
typing-extensions = "*"
uvicorn = "*"
uvloop = "*"
WebOb = "*"
Whoosh = "*"
zipstream-new = "*"
@@ -90,7 +93,6 @@ zipstream-new = "*"
cwltest = "2.2.20210901154959"
darker = "*"
fluent-logger = "*"
gunicorn = "*"
httpx = "*"
lxml = "!=4.2.2"
markdown-it-reporter = "*"
+5 -22
View File
@@ -25,7 +25,6 @@ parse_common_args() {
;;
--stop-daemon|stop)
common_startup_args="$common_startup_args --stop-daemon"
circusctl_args="$circusctl_args quit"
paster_args="$paster_args --stop-daemon"
add_pid_arg=1
uwsgi_args="$uwsgi_args --stop \"$PID_FILE\""
@@ -33,7 +32,6 @@ parse_common_args() {
shift
;;
--restart|restart)
circusctl_args="$circusctl_args restart"
paster_args="$paster_args restart"
add_pid_arg=1
add_log_arg=1
@@ -43,7 +41,6 @@ parse_common_args() {
shift
;;
--daemon|start)
circusd_args="$circusd_args --daemon --log-output $LOG_FILE"
paster_args="$paster_args --daemon"
gunicorn_args="$gunicorn_args --daemon"
GALAXY_DAEMON_LOG="$GALAXY_LOG"
@@ -57,7 +54,6 @@ parse_common_args() {
;;
--status|status)
paster_args="$paster_args $1"
circusctl_args="$circusctl_args $1"
add_pid_arg=1
shift
;;
@@ -70,7 +66,6 @@ parse_common_args() {
;;
*)
paster_args="$paster_args $1"
circusctl_args="$circusctl_args $1"
uwsgi_args="$uwsgi_args $1"
shift
;;
@@ -154,15 +149,9 @@ find_server() {
server_config=$1
server_app=$2
arg_getter_args=
default_webserver="paste"
case "$server_config" in
*.y*ml|''|none)
default_webserver="uwsgi" # paste incapable of this
;;
esac
default_webserver="gravity"
APP_WEBSERVER=${APP_WEBSERVER:-$default_webserver}
CIRCUS_CONFIG_FILE=${CIRCUS_CONFIG_FILE:-config/dev.ini}
if [ "$APP_WEBSERVER" = "uwsgi" ]; then
# Look for uwsgi
if [ -z "$skip_venv" ] && [ -x $GALAXY_VIRTUAL_ENV/bin/uwsgi ]; then
@@ -190,16 +179,7 @@ find_server() {
if [ "$add_log_arg" -eq 1 ]; then
server_args="$server_args --log-file \"$LOG_FILE\""
fi
elif [ "$APP_WEBSERVER" = "dev" ]; then
if [ -n "$circusctl_args" ]; then
run_server="circusctl"
server_args="$circusctl_args"
else
run_server="circusd"
export GALAXY_DAEMON_LOG=$GALAXY_DAEMON_LOG
server_args="$CIRCUS_CONFIG_FILE $circusd_args"
fi
else
elif [ "$APP_WEBSERVER" = "paste" ]; then
run_server="python"
server_args="./scripts/paster.py serve \"$server_config\" $paster_args"
if [ "$add_pid_arg" -eq 1 ]; then
@@ -208,6 +188,9 @@ find_server() {
if [ "$add_log_arg" -eq 1 ]; then
server_args="$server_args --log-file \"$LOG_FILE\""
fi
else
run_server="galaxy"
server_args=
fi
}