README.rst 1010 B

123456789101112131415161718192021222324252627282930313233343536
  1. ==============================================================
  2. Example Django project using Celery
  3. ==============================================================
  4. Contents
  5. ========
  6. :file:`proj/`
  7. -------------
  8. This is the project iself, created using
  9. :program:`django-admin.py startproject proj`, and then the settings module
  10. (:file:`proj/settings.py`) was modified to add ``tasks`` and ``demoapp`` to
  11. ``INSTALLED_APPS``
  12. :file:`tasks/`
  13. --------------
  14. This app contains the Celery application instance for this project,
  15. we take configuration from Django settings and use ``autodiscover_tasks`` to
  16. find task modules inside all packages listed in ``INSTALLED_APPS``.
  17. :file:`demoapp/`
  18. ----------------
  19. Example generic app. This is decoupled from the rest of the project by using
  20. the ``@shared_task`` decorator. Shared tasks are shared between all Celery
  21. instances.
  22. Starting the worker
  23. ===================
  24. .. code-block:: bash
  25. $ DJANGO_SETTINGS_MODULE='proj.settings' celery -A tasks worker -l info