Skip to content
Snippets Groups Projects
Commit 29a215fa authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Revert "Merge branch '3-build-uwsgi-options-in-correct-order' into 'master'"

This reverts merge request !2
parent d83e3e09
No related branches found
No related tags found
No related merge requests found
......@@ -53,12 +53,6 @@ class Command(BaseCommand):
"cache2": "name=%s,items=20000,keysize=128,blocksize=4096" % django_project,
}
# Merge uWSGI options from settings
opts = getattr(settings, "UWSGI_OPTIONS", {})
legacy_opts = getattr(settings, "UWSGI", {})
UWSGI_OPTIONS.update(legacy_opts)
UWSGI_OPTIONS.update(opts)
# Defien configuration-dependent defaults
if UWSGI_OPTIONS.get("workers", 1) > 1 and not "cheaper" in UWSGI_OPTIONS:
UWSGI_OPTIONS["cheaper"] = int(UWSGI_OPTIONS["workers"] / 1.5)
......@@ -78,6 +72,12 @@ class Command(BaseCommand):
if "UWSGI_%s" % key.upper().replace("-", "_") in os.environ:
del UWSGI_OPTIONS[key]
# Merge uWSGI options from settings
opts = getattr(settings, "UWSGI_OPTIONS", {})
legacy_opts = getattr(settings, "UWSGI", {})
UWSGI_OPTIONS.update(legacy_opts)
UWSGI_OPTIONS.update(opts)
if apps.ready:
argv = ['uwsgi']
# Pass the config dict as INI file
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment