File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414from gunicorn .app .base import BaseApplication
1515from 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-
2217os .environ .setdefault ('DJANGO_SETTINGS_MODULE' , 'config.settings' )
2318
19+
2420class 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 ()
You can’t perform that action at this time.
0 commit comments