mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
ignore some settings when needed
This commit is contained in:
parent
ae79f33785
commit
6fa48b95ac
@ -22,10 +22,13 @@ def wrap_method(func):
|
|||||||
return func(*args, **kwargs)
|
return func(*args, **kwargs)
|
||||||
return _wrapped
|
return _wrapped
|
||||||
|
|
||||||
def make_settings():
|
def make_settings(ignore=None):
|
||||||
settings = {}
|
settings = {}
|
||||||
|
ignore = ignore or ()
|
||||||
for s in KNOWN_SETTINGS:
|
for s in KNOWN_SETTINGS:
|
||||||
setting = s()
|
setting = s()
|
||||||
|
if setting.name in ignore:
|
||||||
|
continue
|
||||||
settings[setting.name] = setting.copy()
|
settings[setting.name] = setting.copy()
|
||||||
return settings
|
return settings
|
||||||
|
|
||||||
|
|||||||
@ -16,7 +16,7 @@ from gunicorn.app.djangoapp import DjangoApplicationCommand
|
|||||||
from gunicorn.config import make_settings
|
from gunicorn.config import make_settings
|
||||||
|
|
||||||
def make_options():
|
def make_options():
|
||||||
g_settings = make_settings()
|
g_settings = make_settings(ignore=("version"))
|
||||||
|
|
||||||
keys = g_settings.keys()
|
keys = g_settings.keys()
|
||||||
def sorter(k):
|
def sorter(k):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user