Selaa lähdekoodia

Merge branch '3.0'

Ask Solem 12 vuotta sitten
vanhempi
commit
c507bf27b0
1 muutettua tiedostoa jossa 7 lisäystä ja 7 poistoa
  1. 7 7
      docs/faq.rst

+ 7 - 7
docs/faq.rst

@@ -423,19 +423,19 @@ Results
 How do I get the result of a task if I have the ID that points there?
 ----------------------------------------------------------------------
 
-**Answer**: Use `Task.AsyncResult`::
+**Answer**: Use `task.AsyncResult`::
 
-    >>> result = MyTask.AsyncResult(task_id)
+    >>> result = my_task.AsyncResult(task_id)
     >>> result.get()
 
-This will give you a :class:`~celery.result.BaseAsyncResult` instance
+This will give you a :class:`~celery.result.AsyncResult` instance
 using the tasks current result backend.
 
-If you need to specify a custom result backend you should use
-:class:`celery.result.BaseAsyncResult` directly::
+If you need to specify a custom result backend, or you want to use
+the current application's default backend you can use
+:class:`@Celery.AsyncResult`:
 
-    >>> from celery.result import BaseAsyncResult
-    >>> result = BaseAsyncResult(task_id, backend=...)
+    >>> result = app.AsyncResult(task_id)
     >>> result.get()
 
 .. _faq-security: