Explorar o código

Fixes example using old style retries

Ask Solem %!s(int64=14) %!d(string=hai) anos
pai
achega
0c163d812d
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      celery/task/__init__.py

+ 2 - 2
celery/task/__init__.py

@@ -71,11 +71,11 @@ def periodic_task(*args, **options):
             .. code-block:: python
 
                 @task(exchange="feeds")
-                def refresh_feed(url, **kwargs):
+                def refresh_feed(url):
                     try:
                         return Feed.objects.get(url=url).refresh()
                     except socket.error, exc:
-                        refresh_feed.retry(args=[url], kwargs=kwargs, exc=exc)
+                        refresh_feed.retry(exc=exc)
 
             Calling the resulting task: