diff --git a/setup.cfg b/setup.cfg index a5a5b815a..fff0efe69 100644 --- a/setup.cfg +++ b/setup.cfg @@ -18,7 +18,7 @@ ignore = E121,E123,E125,E126,E129,E226,E24,E704,E501,F403 max-line-length = 140 [isort] -skip = .git,__pycache__,.vagrant,node_modules,migrations,wsgi.py +skip = .git,__pycache__,.vagrant,node_modules,migrations multi_line_output = 1 force_grid_wrap = true line_length = 140 diff --git a/treeherder/config/wsgi.py b/treeherder/config/wsgi.py index 449acb055..7f63ebcab 100644 --- a/treeherder/config/wsgi.py +++ b/treeherder/config/wsgi.py @@ -8,16 +8,15 @@ this application via the ``WSGI_APPLICATION`` setting. """ import os +from django.core.cache.backends.memcached import BaseMemcachedCache +from django.core.wsgi import get_wsgi_application + # We defer to a DJANGO_SETTINGS_MODULE already in the environment. This breaks # if running multiple sites in the same mod_wsgi process. To fix this, use # mod_wsgi daemon mode with each site in its own daemon process, or use # os.environ["DJANGO_SETTINGS_MODULE"] = "treeherder.config.settings" os.environ.setdefault("DJANGO_SETTINGS_MODULE", "treeherder.config.settings") -from django.core.cache.backends.memcached import BaseMemcachedCache -from django.core.wsgi import get_wsgi_application - - application = get_wsgi_application() # Fix django closing connection to MemCachier after every request: