README.rst 969 B

123456789101112131415161718192021222324252627282930313233343536
  1. ==============================================================
  2. Example Django project using Celery
  3. ==============================================================
  4. Contents
  5. ========
  6. ``proj/``
  7. ---------
  8. This is the project iself, created using
  9. ``django-admin.py startproject proj``, and then the settings module
  10. (``proj/settings.py``) was modified to add ``demoapp`` to
  11. ``INSTALLED_APPS``
  12. ``proj/celery.py``
  13. ----------
  14. This module 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. ``demoapp/``
  18. ------------
  19. Example generic app. This is decoupled from the rest of the project by using
  20. the ``@shared_task`` decorator. This decorator returns a proxy that always
  21. points to the currently active Celery instance.
  22. Starting the worker
  23. ===================
  24. .. code-block:: bash
  25. $ celery -A proj worker -l info