Merge "Update compass-celery daemon to use celery worker" into dev/experimental

This commit is contained in:
Jenkins 2014-08-09 05:59:32 +00:00 committed by Gerrit Code Review
commit 534fe8fffa
2 changed files with 10 additions and 10 deletions

View File

@ -52,7 +52,7 @@ sudo sed -i "s/\$compass_hostname/$HOSTNAME/g" /etc/compass/global_config
sudo sed -i "s/\$compass_testmode/$TESTMODE/g" /etc/compass/global_config
sudo sed -e 's|$PythonHome|'$VIRTUAL_ENV'|' -i /var/www/compass/compass.wsgi
sudo sed -e 's|$Python|'$VIRTUAL_ENV/bin/python'|' -i /etc/init.d/compass-progress-updated
sudo sed -e 's|$CeleryPath|'$VIRTUAL_ENV/bin/celeryd'|' -i /etc/init.d/compass-celeryd
sudo sed -e 's|$CeleryPath|'$VIRTUAL_ENV/bin/celery'|' -i /etc/init.d/compass-celeryd
sudo sed -e 's|$Python|'$VIRTUAL_ENV/bin/python'|' -i /usr/bin/compassd
sudo sed -i "s/\$ipaddr/$ipaddr/g" /etc/compass/os_metadata/general.conf
sudo sed -i "s/\$hostname/$HOSTNAME/g" /etc/compass/os_metadata/general.conf

View File

@ -37,14 +37,14 @@ RETVAL=0
start() {
echo -n "Starting Compass Celeryd: "
if [ -f $SUSE ]; then
startproc -f -p /var/run/celeryd.pid -l /tmp/celeryd.log "C_FORCE_ROOT=1 CELERY_CONFIG_MODULE=compass.utils.celeryconfig_wrapper $CELERY"
startproc -f -p /var/run/celery-worker.pid -l /tmp/celery-worker.log "C_FORCE_ROOT=1 CELERY_CONFIG_MODULE=compass.utils.celeryconfig_wrapper $CELERY worker"
rc_status -v
RETVAL=$?
elif [ -f $DEBIAN ]; then
start_daemon -p /var/run/celeryd.pid "C_FORCE_ROOT=1 CELERY_CONFIG_MODULE=compass.utils.celeryconfig_wrapper $CELERY &>/tmp/celeryd.log & echo \$! > /var/run/celeryd.pid"
start_daemon -p /var/run/celery-worker.pid "C_FORCE_ROOT=1 CELERY_CONFIG_MODULE=compass.utils.celeryconfig_wrapper $CELERY worker &>/tmp/celery-worker.log & echo \$! > /var/run/celery-worker.pid"
RETVAL=$?
else
daemon --pidfile /var/run/celeryd.pid "C_FORCE_ROOT=1 CELERY_CONFIG_MODULE=compass.utils.celeryconfig_wrapper $CELERY &>/tmp/celeryd.log & echo \$! > /var/run/celeryd.pid"
daemon --pidfile /var/run/celery-worker.pid "C_FORCE_ROOT=1 CELERY_CONFIG_MODULE=compass.utils.celeryconfig_wrapper $CELERY worker &>/tmp/celery-worker.log & echo \$! > /var/run/celery-worker.pid"
RETVAL=$?
fi
echo
@ -54,14 +54,14 @@ start() {
stop() {
echo -n "Stopping Compass Celeryd: "
if [ -f $SUSE ]; then
killproc -t 10 -p /var/run/celeryd.pid $CELERY
killproc -t 10 -p /var/run/celery-worker.pid $CELERY worker
rc_status -v
RETVAL=$?
elif [ -f $DEBIAN ]; then
killproc -p /var/run/celeryd.pid $CELERY -TERM
killproc -p /var/run/celery-worker.pid $CELERY worker -TERM
RETVAL=$?
else
killproc -p /var/run/celeryd.pid -d 30 $CELERY
killproc -p /var/run/celery-worker.pid -d 30 $CELERY worker
RETVAL=$?
fi
echo
@ -78,12 +78,12 @@ case "$1" in
status)
echo -n "Checking compass celeryd: "
if [ -f $SUSE ]; then
checkproc -v -p /var/run/celeryd.pid $CELERY
checkproc -v -p /var/run/celery-worker.pid $CELERY worker
rc_status -v
elif [ -f $DEBIAN ]; then
status_of_proc -p /var/run/celeryd.pid $CELERY
status_of_proc -p /var/run/celery-worker.pid $CELERY worker
else
status -p /var/run/celeryd.pid $CELERY
status -p /var/run/celery-worker.pid $CELERY worker
echo
fi
;;