⚠ Warning this was done in Dajngo 1.7 *
- Install Python (if you're in linux, python 2.7 is already installed), pip, django (and run
./manage.py syncdb
), celery, and django-celery - Choose your celery broker and install that: RabbitMQ, Redis, others...
- Setup django-celery part 1: http://docs.celeryproject.org/en/latest/django/first-steps-with-django.html#using-the-django-orm-cache-as-a-result-backend
- Setup django-celery part 2: https://github.com/celery/django-celery/blob/master/README.rst#using-django-celery
- Start all the things (processes):
- Start your
redis-server
orrabbitmq-server
, ect... - Start Django:
./manage.py runserver
(and./manage.py runserver $IP:$PORT
in Cloud 9) - Start the Celery Event Camera via:
./manage.py celery events --camera=djcelery.snapshot.Camera
- Start
celeryd
with celery beat (-B
):./manage.py celeryd -B -l INFO
- Run a task:
./manage.py shell
from demoapp.tasks import add
add.delay(2,2)
- and you should then see things happening in the Celery Beat process and in the Django Admin
Lots of steps involved and that's why I put together this project to provide an isolated example of using django-celery that worked for me in 2015 on Django 1.7 The less steps it takes, the more likely you are to get it running sooner. Cheers!