Forráskód Böngészése

Fix restrucuted text problems

Ask Solem 15 éve
szülő
commit
8dbde52238

+ 7 - 10
Changelog

@@ -17,7 +17,7 @@ You don't have to change old code right away, because a task can't be
 registered twice.
 registered twice.
 
 
 If you don't want your task to be automatically registered you can set
 If you don't want your task to be automatically registered you can set
-the ``abstract`` attribute::
+the ``abstract`` attribute
 
 
 .. code-block:: python
 .. code-block:: python
 
 
@@ -33,15 +33,15 @@ anymore if you use relative imports.
 
 
 * You can no longer use regular functions as tasks. This change was added
 * You can no longer use regular functions as tasks. This change was added
   because it makes the internals a lot more clean and simple. However, you can
   because it makes the internals a lot more clean and simple. However, you can
-  now turn functions into tasks by using the ``@task`` decorator::
+  now turn functions into tasks by using the ``@task`` decorator:
 
 
 .. code-block:: python
 .. code-block:: python
 
 
-		from celery.decorators import task
+	from celery.decorators import task
 
 
-		@task()
+	@task()
-		def add(x, y):
+	def add(x, y):
-			return x + y
+		return x + y
 
 
 See the User Guide for more information.
 See the User Guide for more information.
 
 
@@ -82,9 +82,6 @@ See the User Guide for more information.
 * New cool task decorator syntax.
 * New cool task decorator syntax.
 
 
 
 
-
-
-
 **CHANGES**
 **CHANGES**
 
 
 * New dependencies: billiard, python-dateutil, django-picklefield
 * New dependencies: billiard, python-dateutil, django-picklefield
@@ -156,7 +153,7 @@ that was the previously implied name.
 **CHANGES**
 **CHANGES**
 
 
 * Incorporated the multiprocessing backport patch that fixes the
 * Incorporated the multiprocessing backport patch that fixes the
-``processName`` error.
+  ``processName`` error.
 
 
 * Ignore the result of PeriodicTask's by default.
 * Ignore the result of PeriodicTask's by default.
 
 

+ 2 - 1
celery/task/base.py

@@ -105,7 +105,7 @@ class Task(object):
         Default time in seconds before a retry of the task should be
         Default time in seconds before a retry of the task should be
         executed. Default is a 1 minute delay.
         executed. Default is a 1 minute delay.
 
 
-    .. rate_limit::
+    .. attribute:: rate_limit
 
 
         Set the rate limit for this task type, Examples: ``None`` (no rate
         Set the rate limit for this task type, Examples: ``None`` (no rate
         limit), ``"100/s"`` (hundred tasks a second), ``"100/m"`` (hundred
         limit), ``"100/s"`` (hundred tasks a second), ``"100/m"`` (hundred
@@ -121,6 +121,7 @@ class Task(object):
         ``settings.SEND_CELERY_ERROR_EMAILS`` is on.)
         ``settings.SEND_CELERY_ERROR_EMAILS`` is on.)
 
 
     .. attribute:: serializer
     .. attribute:: serializer
+
         The name of a serializer that has been registered with
         The name of a serializer that has been registered with
         :mod:`carrot.serialization.registry`. Example: ``"json"``.
         :mod:`carrot.serialization.registry`. Example: ``"json"``.
 
 

+ 1 - 0
docs/internals/index.rst

@@ -9,4 +9,5 @@
     :maxdepth: 2
     :maxdepth: 2
 
 
     worker
     worker
+    protocol
     reference/index
     reference/index

+ 5 - 5
docs/internals/reference/celery.worker.buckets.rst

@@ -1,8 +1,8 @@
-===============================================
+======================================================
- Token Bucket (rate limiting) - celery.buckets
+ Token Bucket (rate limiting) - celery.worker.buckets
-===============================================
+======================================================
 
 
-.. currentmodule:: celery.buckets
+.. currentmodule:: celery.worker.buckets
 
 
-.. automodule:: celery.buckets
+.. automodule:: celery.worker.buckets
     :members:
     :members:

+ 1 - 0
docs/userguide/tasks.rst

@@ -9,6 +9,7 @@ With a function ``create_user``, that takes two arguments: ``username`` and
 ``password``, you can create a task like this:
 ``password``, you can create a task like this:
 
 
 .. code-block:: python
 .. code-block:: python
+
     from celery.task import Task
     from celery.task import Task
 
 
     class CreateUserTask(Task):
     class CreateUserTask(Task):