Add procname for uwsgi based service cyborg-api

Code in grenade and elsewhere rely on the process/service name
when one runs "ps auxw" and they grep for example "grep -e cyborg-api"
to check if the service is running. with uwsgi, let us make sure
we use process name prefix so it is easier to spot the services
and be compatible with code elsewhere that relies on this.

Reference:
https://review.opendev.org/#/c/494531/

Change-Id: I7afa389160d3a2355e7a077fec2570423254c83d
This commit is contained in:
chenke 2019-12-02 19:07:49 +08:00
parent f13a0a69da
commit 48370628c4
1 changed files with 1 additions and 1 deletions

View File

@ -279,7 +279,7 @@ function start_cyborg {
# Starts Cyborg API server.
function start_cyborg_api {
if [ "$CYBORG_USE_UWSGI" == "True" ]; then
run_process cyborg-api "$CYBORG_BIN_DIR/uwsgi --ini $CYBORG_UWSGI_CONF"
run_process cyborg-api "$CYBORG_BIN_DIR/uwsgi --ini $CYBORG_UWSGI_CONF --procname-prefix cyborg-api"
else
run_process cyborg-api "$CYBORG_BIN_DIR/cyborg-api --config-file $CYBORG_CONF_FILE"
fi