Browse Source

Fixes typo in result.collect example

Ask Solem 11 years ago
parent
commit
f685e97757
1 changed files with 7 additions and 4 deletions
  1. 7 4
      celery/result.py

+ 7 - 4
celery/result.py

@@ -166,15 +166,18 @@ class AsyncResult(ResultBase):
 
         .. code-block:: python
 
-            @task()
+            from celery import group
+            from proj.celery import app
+
+            @app.task
             def A(how_many):
-                return group(B.s(i) for i in range(how_many))
+                return group(B.s(i) for i in range(how_many))()
 
-            @task()
+            @app.task
             def B(i):
                 return pow2.delay(i)
 
-            @task()
+            @app.task
             def pow2(i):
                 return i ** 2