Explorar el Código

using cache module to get settings no global namespace

Vitaly Babiy hace 16 años
padre
commit
a7ac8fbf21
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      celery/worker.py

+ 1 - 1
celery/worker.py

@@ -78,7 +78,7 @@ def jail(task_id, func, args, kwargs):
     # instead of libmemcache (cmemcache). Should find a better solution for
     # this, but for now "memcached" should probably be unique enough of a
     # string to not make problems.
-    if "memcached" in cache.parse_backend_uri(settings.CACHE_BACKEND)[0]:
+    if "memcached" in cache.parse_backend_uri(cache.settings.CACHE_BACKEND)[0]:
         cache.cache.close()
 
     # Backend process cleanup