Skip to content

Commit

Permalink
No magic arg getter for gunicorn means we have to explicitly pass the
Browse files Browse the repository at this point in the history
sample config if necessary
  • Loading branch information
natefoo committed Jan 24, 2022
1 parent 98e1cd0 commit 096c75a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions run_reports.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,12 @@ if [ -z "$GALAXY_REPORTS_CONFIG" ]; then
fi

find_server ${GALAXY_REPORTS_CONFIG:-none} reports

if [ "$run_server" = "gunicorn" -a -z "$GALAXY_REPORTS_CONFIG" ]; then
GALAXY_REPORTS_CONFIG="config/reports.yml.sample"
export GALAXY_REPORTS_CONFIG
echo 'WARNING: Using default reports config at config/reports.yml.sample, copy to config/reports.yml or set $GALAXY_REPORTS_CONFIG if this is not intentional'
fi

echo "Executing: $run_server $server_args"
eval $run_server $server_args
3 changes: 2 additions & 1 deletion scripts/common_startup_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ find_server() {
server_args="$server_args $uwsgi_args"
elif [ "$APP_WEBSERVER" = "gunicorn" ]; then
export GUNICORN_CMD_ARGS="${GUNICORN_CMD_ARGS:-\"--bind=localhost:8080\"}"
server_args="$APP_WEBSERVER 'galaxy.webapps.${server_app}.fast_factory:factory()' --pythonpath lib -k ${gunicorn_worker:-$default_gunicorn_worker} $gunicorn_args"
run_server="gunicorn"
server_args="'galaxy.webapps.${server_app}.fast_factory:factory()' --pythonpath lib -k ${gunicorn_worker:-$default_gunicorn_worker} $gunicorn_args"
if [ "$add_pid_arg" -eq 1 ]; then
server_args="$server_args --pid \"$PID_FILE\""
fi
Expand Down

0 comments on commit 096c75a

Please sign in to comment.