Ask Solem 10 years ago
parent
commit
774a347c55
1 changed files with 2 additions and 2 deletions
  1. 2 2
      docs/tutorials/task-cookbook.rst

+ 2 - 2
docs/tutorials/task-cookbook.rst

@@ -38,8 +38,8 @@ The cache key expires after some time in case something unexpected happens
 
 
     LOCK_EXPIRE = 60 * 5 # Lock expires in 5 minutes
     LOCK_EXPIRE = 60 * 5 # Lock expires in 5 minutes
 
 
-    @task
-    def import_feed(feed_url):
+    @task(bind=True)
+    def import_feed(self, feed_url):
         # The cache key consists of the task name and the MD5 digest
         # The cache key consists of the task name and the MD5 digest
         # of the feed URL.
         # of the feed URL.
         feed_url_hexdigest = md5(feed_url).hexdigest()
         feed_url_hexdigest = md5(feed_url).hexdigest()