소스 검색

Fix small errors in celery.contrib.batches examples (#3424)

captaincapsaicin 8 년 전
부모
커밋
4ca119d27a
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      celery/contrib/batches.py

+ 2 - 2
celery/contrib/batches.py

@@ -33,7 +33,7 @@ to store it in a database.
 
 Then you can ask for a click to be counted by doing::
 
-    >>> count_click.delay('http://example.com')
+    >>> count_click.delay(url='http://example.com')
 
 **Example returning results**
 
@@ -66,7 +66,7 @@ messages, and every 10 seconds.
             wot_api_target,
             params={'hosts': ('/').join(set(domains)) + '/'}
         )
-        return [response.json[domain] for domain in domains]
+        return [response.json()[domain] for domain in domains]
 
 Using the API is done as follows::