Explorar o código

Merge pull request #3259 from mgalgs/patch-2

task-cookbook: Note on cache backends
Ask Solem %!s(int64=8) %!d(string=hai) anos
pai
achega
6a625b4e75
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      docs/tutorials/task-cookbook.rst

+ 5 - 0
docs/tutorials/task-cookbook.rst

@@ -71,3 +71,8 @@ For this reason your tasks run-time should not exceed the timeout.
                 return Feed.objects.import_feed(feed_url).url
         logger.debug(
             'Feed %s is already being imported by another worker', feed_url)
+
+
+Note that in order for this to work correctly you need to be using a cache
+backend that supports an atomic ``.add`` operation.  ``memcached`` is known
+to work well for this purpose.