Running Celery Worker and Queues

395 views
Skip to first unread message

Enmanuel Toribio

unread,
Jun 14, 2016, 3:13:43 PM6/14/16
to rapidpro-dev
After some struggle I found out how to raise the celery worker, i'm leaving it here so anyone who runs into this problem can deal with it.

Go to the rapidpro root folder and run the following:

python manage.py celery -A temba worker -l info -Q msgs,default,handler,flow


FYI: I'm working on ubuntu server 14.04

Allan Stockman rugano

unread,
Jul 5, 2016, 6:31:16 AM7/5/16
to rapidpro-dev
Right. Also you can run the Celery workers as daemons under supervisor. http://michal.karzynski.pl/blog/2014/05/18/setting-up-an-asynchronous-task-queue-for-django-using-celery-redis/ 

Enmanuel Toribio

unread,
Aug 15, 2016, 1:04:03 PM8/15/16
to rapidpro-dev
In the end I did the following:

I created a daemon file for celery

nano /etc/default/celeryd

then added the following lines to the file:


CELERYD_NODES=1

CELERY_BIN="/var/www/rapidpro/env/bin/celery"

CELERY_APP="temba"


CELERYD_CHDIR="/var/www/rapidpro/"


CELERYD_LOG_FILE="/var/log/celery/%N.log"

CELERYD_PID_FILE="/var/run/celery/%N.pid"


CELERY_CREATE_MISSING_QUEUES=1

CELERYD_OPTS="--time-limit=300 --concurrency=10 -Q celery,msgs,default,handler,flows -l info -B"


CELERYD_USER="root"

CELERYD_GROUP="root"


CELERY_CREATE_DIRS=1



then downloaded the celeryd file  into /etc/init.d/celeryd

and ran the command

/etc/init.d/celeryd start

Reply all
Reply to author
Forward
Message has been deleted
0 new messages