Procházet zdrojové kódy

Fix typos in TaskSet examples (thanks karihre)

Ask Solem před 15 roky
rodič
revize
de7d9b85e3
1 změnil soubory, kde provedl 8 přidání a 8 odebrání
  1. 8 8
      celery/task/base.py

+ 8 - 8
celery/task/base.py

@@ -471,14 +471,14 @@ class TaskSet(object):
 
         >>> from djangofeeds.tasks import RefreshFeedTask
         >>> taskset = TaskSet(RefreshFeedTask, args=[
-        ...                 [], {"feed_url": "http://cnn.com/rss"},
-        ...                 [], {"feed_url": "http://bbc.com/rss"},
-        ...                 [], {"feed_url": "http://xkcd.com/rss"}])
+        ...                 ([], {"feed_url": "http://cnn.com/rss"}),
+        ...                 ([], {"feed_url": "http://bbc.com/rss"}),
+        ...                 ([], {"feed_url": "http://xkcd.com/rss"})
+        ... ])
 
         >>> taskset_result = taskset.run()
         >>> list_of_return_values = taskset.join()
 
-
     """
 
     def __init__(self, task, args):
@@ -501,10 +501,10 @@ class TaskSet(object):
 
         Example
 
-            >>> ts = TaskSet(RefreshFeedTask, [
-            ...         ["http://foo.com/rss", {}],
-            ...         ["http://bar.com/rss", {}],
-            ... )
+            >>> ts = TaskSet(RefreshFeedTask, args=[
+            ...         (["http://foo.com/rss"], {}),
+            ...         (["http://bar.com/rss"], {}),
+            ... ])
             >>> result = ts.run()
             >>> result.taskset_id
             "d2c9b261-8eff-4bfb-8459-1e1b72063514"