Browse Source

Remove django-specific stuff from docs

Ask Solem 15 years ago
parent
commit
e5ee7c0c78

+ 0 - 1
docs/cookbook/index.rst

@@ -7,7 +7,6 @@
 
     tasks
     daemonizing
-    unit-testing
 
 This page contains common recipes and techniques.
 Whenever a setting is mentioned, you should use ``celeryconf.py`` if using

+ 0 - 1
docs/getting-started/index.rst

@@ -11,6 +11,5 @@
     introduction
     broker-installation
     first-steps-with-celery
-    first-steps-with-django
     periodic-tasks
     resources

+ 12 - 27
docs/getting-started/periodic-tasks.rst

@@ -7,33 +7,27 @@ Here's an example of a periodic task:
 
 .. code-block:: python
 
-    from celery.task import PeriodicTask
-    from celery.registry import tasks
+    from celery.decorators import periodic_task
     from datetime import timedelta
 
-    class MyPeriodicTask(PeriodicTask):
-        run_every = timedelta(seconds=30)
-
-        def run(self, **kwargs):
-            logger = self.get_logger(**kwargs)
-            logger.info("Running periodic task!")
-    >>> tasks.register(MyPeriodicTask)
+    @periodic_task(run_every=timedelta(seconds=30))
+    def every_30_seconds(\*\*kwargs):
+        logger = self.get_logger(\*\*kwargs)
+        logger.info("Running periodic task!")
 
 If you want a little more control over when the task is executed, for example,
-a particular time of day or day of the week, you can use ``crontab`` to set
-the ``run_every`` property:
+a particular time of day or day of the week, you can use the ``crontab`` schedule
+type:
 
 .. code-block:: python
 
-    from celery.task import PeriodicTask
     from celery.task.schedules import crontab
+    from celery.decorators import periodic_task
 
-    class EveryMondayMorningTask(PeriodicTask):
-        run_every = crontab(hour=7, minute=30, day_of_week=1)
-
-        def run(self, **kwargs):
-            logger = self.get_logger(**kwargs)
-            logger.info("Execute every Monday at 7:30AM.")
+    @periodoc_task(run_every=crontab(hour=7, minute=30, day_of_week=1))
+    def every_monday_morning(\*\*kwargs):
+        logger = self.get_logger(\*\*kwargs)
+        logger.info("Execute every Monday at 7:30AM.")
 
 If you want to use periodic tasks you need to start the ``celerybeat``
 service. You have to make sure only one instance of this server is running at
@@ -43,16 +37,7 @@ To start the ``celerybeat`` service::
 
     $ celerybeat
 
-or if using Django::
-
-    $ python manage.py celerybeat
-
-
 You can also start ``celerybeat`` with ``celeryd`` by using the ``-B`` option,
 this is convenient if you only have one server::
 
     $ celeryd -B
-
-or if using Django::
-
-    $ python manage.py celeryd  -B

+ 5 - 4
docs/includes/introduction.txt

@@ -5,7 +5,7 @@
 :Download: http://pypi.python.org/pypi/celery/
 :Source: http://github.com/ask/celery/
 :Keywords: task queue, job queue, asynchronous, rabbitmq, amqp, redis,
-  django, python, webhooks, queue, distributed
+  python, webhooks, queue, distributed
 
 --
 
@@ -18,13 +18,14 @@ more worker servers. Tasks can execute asynchronously (in the background) or syn
 
 Celery is already used in production to process millions of tasks a day.
 
-Celery was originally created for use with Django, but is now usable
-from any Python project. It can
-also `operate with other languages via webhooks`_.
+Celery was originally created for use with Django, but this is no longer
+the case. If you want to use Celery in a Django project you need to use
+`django-celery`_. It can also `operate with other languages via webhooks`_.
 
 The recommended message broker is `RabbitMQ`_, but support for Redis and
 databases is also available.
 
+.. _`django-celery`: http://pypi.python.org/pypi/django-celery
 .. _`operate with other languages via webhooks`:
     http://ask.github.com/celery/userguide/remote-tasks.html
 

+ 0 - 4
docs/internals/reference/index.rst

@@ -24,8 +24,6 @@
     celery.backends
     celery.backends.base
     celery.backends.amqp
-    celery.backends.database
-    celery.backends.cache
     celery.backends.mongodb
     celery.backends.pyredis
     celery.backends.tyrant
@@ -38,5 +36,3 @@
     celery.utils.compat
     celery.utils.patch
     celery.platform
-    celery.managers
-    celery.models

+ 0 - 3
docs/reference/index.rst

@@ -23,13 +23,10 @@
     celery.loaders
     celery.loaders.base
     celery.loaders.default
-    celery.loaders.djangoapp
     celery.registry
     celery.states
     celery.messaging
-    celery.contrib.test_runner
     celery.contrib.abortable
-    celery.views
     celery.events
     celery.bin.celeryd
     celery.bin.celerybeat

+ 1 - 3
docs/userguide/tasks.rst

@@ -430,9 +430,7 @@ This is the list of tasks built-in to celery. Note that we had to import
 only be registered when the module they are defined in is imported.
 
 The default loader imports any modules listed in the
-``CELERY_IMPORTS`` setting. If using Django it loads all ``tasks.py`` modules
-for the applications listed in ``INSTALLED_APPS``. If you want to do something
-special you can create your own loader to do what you want.
+``CELERY_IMPORTS`` setting. 
 
 The entity responsible for registering your task in the registry is a
 meta class, :class:`TaskType`. This is the default meta class for