瀏覽代碼

Fix restrucuted text problems

Ask Solem 15 年之前
父節點
當前提交
8dbde52238
共有 5 個文件被更改,包括 16 次插入16 次删除
  1. 7 10
      Changelog
  2. 2 1
      celery/task/base.py
  3. 1 0
      docs/internals/index.rst
  4. 5 5
      docs/internals/reference/celery.worker.buckets.rst
  5. 1 0
      docs/userguide/tasks.rst

+ 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.
 
 If you don't want your task to be automatically registered you can set
-the ``abstract`` attribute::
+the ``abstract`` attribute
 
 .. 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
   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
 
-		from celery.decorators import task
+	from celery.decorators import task
 
-		@task()
-		def add(x, y):
-			return x + y
+	@task()
+	def add(x, y):
+		return x + y
 
 See the User Guide for more information.
 
@@ -82,9 +82,6 @@ See the User Guide for more information.
 * New cool task decorator syntax.
 
 
-
-
-
 **CHANGES**
 
 * New dependencies: billiard, python-dateutil, django-picklefield
@@ -156,7 +153,7 @@ that was the previously implied name.
 **CHANGES**
 
 * Incorporated the multiprocessing backport patch that fixes the
-``processName`` error.
+  ``processName`` error.
 
 * 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
         executed. Default is a 1 minute delay.
 
-    .. rate_limit::
+    .. attribute:: rate_limit
 
         Set the rate limit for this task type, Examples: ``None`` (no rate
         limit), ``"100/s"`` (hundred tasks a second), ``"100/m"`` (hundred
@@ -121,6 +121,7 @@ class Task(object):
         ``settings.SEND_CELERY_ERROR_EMAILS`` is on.)
 
     .. attribute:: serializer
+
         The name of a serializer that has been registered with
         :mod:`carrot.serialization.registry`. Example: ``"json"``.
 

+ 1 - 0
docs/internals/index.rst

@@ -9,4 +9,5 @@
     :maxdepth: 2
 
     worker
+    protocol
     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:

+ 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:
 
 .. code-block:: python
+
     from celery.task import Task
 
     class CreateUserTask(Task):