Ver Fonte

using cache module to get settings no global namespace

Vitaly Babiy há 16 anos atrás
pai
commit
a7ac8fbf21
1 ficheiros alterados com 1 adições e 1 exclusões
  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
     # instead of libmemcache (cmemcache). Should find a better solution for
     # this, but for now "memcached" should probably be unique enough of a
     # this, but for now "memcached" should probably be unique enough of a
     # string to not make problems.
     # 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()
         cache.cache.close()
 
 
     # Backend process cleanup
     # Backend process cleanup