update compass-celeryd
Change-Id: I2d61d945c599920547e02dfeb9d8901f922a73b9
This commit is contained in:
parent
9da13f2b85
commit
d519f32ebf
@ -18,6 +18,7 @@
|
|||||||
"""
|
"""
|
||||||
import logging
|
import logging
|
||||||
import os.path
|
import os.path
|
||||||
|
import urllib
|
||||||
|
|
||||||
from compass.utils import setting_wrapper as setting
|
from compass.utils import setting_wrapper as setting
|
||||||
|
|
||||||
@ -26,6 +27,7 @@ CELERY_RESULT_BACKEND = 'amqp://'
|
|||||||
|
|
||||||
BROKER_URL = 'amqp://guest:guest@localhost:5672//'
|
BROKER_URL = 'amqp://guest:guest@localhost:5672//'
|
||||||
|
|
||||||
|
|
||||||
CELERY_IMPORTS = ('compass.tasks.tasks',)
|
CELERY_IMPORTS = ('compass.tasks.tasks',)
|
||||||
|
|
||||||
|
|
||||||
|
@ -48,22 +48,22 @@ start() {
|
|||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
fi
|
fi
|
||||||
echo
|
echo
|
||||||
retries=0
|
# retries=0
|
||||||
max_retries=10
|
# max_retries=10
|
||||||
output=''
|
# output=''
|
||||||
while [ $retries -lt $max_retries ]; do
|
# while [ $retries -lt $max_retries ]; do
|
||||||
output=$(C_FORCE_ROOT=1 CELERY_CONFIG_MODULE=compass.utils.celeryconfig_wrapper $CELERY status 2&>1)
|
# output=$(C_FORCE_ROOT=1 CELERY_CONFIG_MODULE=compass.utils.celeryconfig_wrapper $CELERY status 2&>1)
|
||||||
RETVAL=$?
|
# RETVAL=$?
|
||||||
if [ "$RETVAL" == "0" ]; then
|
# if [ "$RETVAL" == "0" ]; then
|
||||||
break
|
# break
|
||||||
else
|
# else
|
||||||
sleep 10
|
# sleep 10
|
||||||
fi
|
# fi
|
||||||
let retries=${retries}+1
|
# let retries=${retries}+1
|
||||||
done
|
# done
|
||||||
if [ "$RETVAL" != "0" ]; then
|
# if [ "$RETVAL" != "0" ]; then
|
||||||
echo output
|
# echo output
|
||||||
fi
|
# fi
|
||||||
return $RETVAL
|
return $RETVAL
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,10 +104,10 @@ case "$1" in
|
|||||||
status -p /var/run/celery-worker.pid $CELERY
|
status -p /var/run/celery-worker.pid $CELERY
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
fi
|
fi
|
||||||
if [ "$RETVAL" == "0" ]; then
|
# if [ "$RETVAL" == "0" ]; then
|
||||||
C_FORCE_ROOT=1 CELERY_CONFIG_MODULE=compass.utils.celeryconfig_wrapper $CELERY status
|
# C_FORCE_ROOT=1 CELERY_CONFIG_MODULE=compass.utils.celeryconfig_wrapper $CELERY status
|
||||||
RETVAL=$?
|
# RETVAL=$?
|
||||||
fi
|
# fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: $0 {start|stop|status|restart}"
|
echo "Usage: $0 {start|stop|status|restart}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user