Skip to content

Commit 735c138

Browse files
committed
WIP: fix shutdown, break logging
1 parent c2ef102 commit 735c138

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

app/wsgi.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,9 @@
1414
from gunicorn.app.base import BaseApplication
1515
from gunicorn.workers.ggevent import GeventWorker
1616

17-
from django.core.wsgi import get_wsgi_application
18-
19-
# Here we cannot uses `from django.conf import settings` because it breaks the `make gunicornserver`
20-
from config.settings import get_logging_config
21-
2217
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings')
2318

19+
2420
class StandaloneApplication(BaseApplication): # pylint: disable=abstract-method
2521

2622
def __init__(self, options=None): # pylint: disable=redefined-outer-name
@@ -37,6 +33,7 @@ def load_config(self):
3733
self.cfg.set(key.lower(), value)
3834

3935
def load(self):
36+
from django.core.wsgi import get_wsgi_application
4037
return get_wsgi_application()
4138

4239

@@ -77,6 +74,5 @@ def dump_stacks():
7774
'timeout': 60,
7875
'graceful_timeout': int(os.environ.get('GUNICORN_GRACEFUL_TIMEOUT', 30)),
7976
'keepalive': int(os.environ.get('GUNICORN_KEEPALIVE', 2)),
80-
'logconfig_dict': get_logging_config(),
8177
}
8278
StandaloneApplication(options).run()

0 commit comments

Comments
 (0)