Andrew Colin Kissa schreef:
On 27 Jun 2011, at 2:14 PM, Johan Hendriks wrote:
/usr/local/lib/python2.7/site-packages/celery-2.2.6-py2.7.egg/celery/loaders/default.py:54:
NotConfigured: No 'celeryconfig' module found! Please make sure it
This is because you have not configured it using the Django configuration
examples like
the documentation states, you need to set the configuration options in your
settings.py
and the call celery using the manage.py command
celeryd with superuser privileges is not encouraged!
"Running celeryd with superuser privileges is not encouraged!")
Please do not run celeryd as the root user, create a celery specific
unprivileged account
-
i have created the /etc/default file (i created it as
/usr/local/etc/baruwa/baruwa).
it contains the following
# Baruwa Celery worker daemon configuration
#
CELERYD_CHDIR="/usr/local/lib/python2.7/site-packages/baruwa-1.1.0-py2.7.egg/baruwa"
CELERYD="/usr/local/lib/python2.7/site-packages/baruwa-1.1.0-py2.7.egg/baruwa/manage.py
celeryd"
export DJANGO_SETTINGS_MODULE="settings"
CELERYD_NODES=$(hostname -s)
#CELERYD_OPTS="--time-limit=300 -E --beat -s
/var/lib/baruwa/celerybeat-schedule"
CELERYD_OPTS="--time-limit=300"
CELERYD_PID_FILE="/var/run/celery/celeryd.pid"
CELERYD_LOG_FILE=/var/log/celery/celeryd.log
CELERYD_USER="celery"
CELERYD_GROUP="celery"
I have created the user celery and the group celery.
then i have downloaded the init file from the celery documentation site.
https://github.com/ask/celery/blob/master/contrib/generic-init.d/celeryd
did change the following line(s).
if test -f /etc/default/celeryd; then
. /etc/default/celeryd
fi
to
if test -f /usr/local/etc/baruwa/baruwa; then
. /usr/local/etc/baruwa/baruwa
fi
my settings.py file in
/usr/local/lib/python2.7/site-packages/baruwa-1.1.0-py2.7.egg/baruwa/
has this (celery part)
#celery
CELERY_CONCURRENCY = 20
CELERY_DISABLE_RATE_LIMITS = True
BROKER_HOST = "192.168.50.200"
BROKER_PORT = 5672
BROKER_USER = "baruwa"
BROKER_PASSWORD = "myveryverysecretpassword"
BROKER_VHOST = "baruwa"
CELERY_QUEUES = {
socket.gethostname(): {
"exchange_type": "direct",
"binding_key": socket.gethostname(),
},
"default": {
"exchange": "default",
"binding_key": "default"
},
}
CELERY_DEFAULT_QUEUE = "default"
CELERY_DEFAULT_EXCHANGE = "default"
CELERY_DEFAULT_EXCHANGE_TYPE = "direct"
CELERY_DEFAULT_ROUTING_KEY = "default"
then when i try to start the celeryd through the init script it give me
the following.
beasty ~ # /usr/local/etc/rc.d/celery start
celeryd-multi v2.2.6
> Starting nodes...
> beasty.beasty.double-l.local:
/usr/local/lib/python2.7/site-packages/celery-2.2.6-py2.7.egg/celery/loaders/default.py:54:
NotConfigured: No 'celeryconfig' module found! Please make sure it
exists and is available to Python.
"is available to Python." % (configname, )))
Usage:
/usr/local/lib/python2.7/site-packages/baruwa-1.1.0-py2.7.egg/baruwa/manage.py
celeryd [options]
Runs a Celery worker node.
/usr/local/lib/python2.7/site-packages/baruwa-1.1.0-py2.7.egg/baruwa/manage.py:
error: no such option: --gid
* Child terminated with failure code 2
the one thing i do not get from the init script is the setting :
DEFAULT_NODES="celery"
And later it is used here.
CELERYD_NODES=${CELERYD_NODES:-$DEFAULT_NODES}
What command must i run to start the baruwa celery part by hand?
I am so sorry to waist your time on this, but the whole python thing is
not my cup of tea. :D
Gr
Johan Hendriks
_______________________________________________
Baruwa mailing list
[email protected]
http://lists.baruwa.org/mailman/listinfo/baruwa