浏览代码

Merge pull request #2783 from juanrossi/master

Added headers arg to apply_async docs to fix #2750
Omer Katz 10 年之前
父节点
当前提交
320ae3c971
共有 2 个文件被更改,包括 6 次插入0 次删除
  1. 1 0
      CONTRIBUTORS.txt
  2. 5 0
      celery/app/task.py

+ 1 - 0
CONTRIBUTORS.txt

@@ -189,3 +189,4 @@ James Pulec, 2015/04/19
 Alexander Lebedev, 2015/04/25
 Alexander Lebedev, 2015/04/25
 Frantisek Holop, 2015/05/21
 Frantisek Holop, 2015/05/21
 Feanil Patel, 2015/05/21
 Feanil Patel, 2015/05/21
+Juan Rossi, 2015/08/10

+ 5 - 0
celery/app/task.py

@@ -437,13 +437,18 @@ class Task(object):
                       if an error occurs while executing the task.
                       if an error occurs while executing the task.
 
 
         :keyword producer: :class:`kombu.Producer` instance to use.
         :keyword producer: :class:`kombu.Producer` instance to use.
+
         :keyword add_to_parent: If set to True (default) and the task
         :keyword add_to_parent: If set to True (default) and the task
             is applied while executing another task, then the result
             is applied while executing another task, then the result
             will be appended to the parent tasks ``request.children``
             will be appended to the parent tasks ``request.children``
             attribute.  Trailing can also be disabled by default using the
             attribute.  Trailing can also be disabled by default using the
             :attr:`trail` attribute
             :attr:`trail` attribute
+
         :keyword publisher: Deprecated alias to ``producer``.
         :keyword publisher: Deprecated alias to ``producer``.
 
 
+        :keyword headers: Message headers to be sent in the
+            task (a :class:`dict`)
+
         :rtype :class:`celery.result.AsyncResult`: if
         :rtype :class:`celery.result.AsyncResult`: if
             :setting:`CELERY_ALWAYS_EAGER` is not set, otherwise
             :setting:`CELERY_ALWAYS_EAGER` is not set, otherwise
             :class:`celery.result.EagerResult`:
             :class:`celery.result.EagerResult`: