Browse Source

Specify return type for apply_sync

Corey Farwell 10 năm trước cách đây
mục cha
commit
b3faec8699
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      celery/app/task.py

+ 4 - 0
celery/app/task.py

@@ -532,6 +532,10 @@ class Task(object):
             attribute.  Trailing can also be disabled by default using the
             :attr:`trail` attribute
         :keyword publisher: Deprecated alias to ``producer``.
+        
+        :rtype :class:`celery.result.AsyncResult`: if 
+            :setting:`CELERY_ALWAYS_EAGER` is not set, otherwise 
+            :class:`celery.result.EagerResult`:
 
         Also supports all keyword arguments supported by
         :meth:`kombu.Producer.publish`.