diff --git a/gunicorn/app/pasterapp.py b/gunicorn/app/pasterapp.py index cd4b1ac2..14eedd66 100644 --- a/gunicorn/app/pasterapp.py +++ b/gunicorn/app/pasterapp.py @@ -47,7 +47,12 @@ class PasterApplication(Application): cfg['workers'] = int(lc.get('workers', 1)) cfg['umask'] = int(lc.get('umask', 0)) cfg['default_proc_name'] = gc.get('__file__') - + + for k, v in gc.items(): + if k not in self.cfg.settings: + continue + cfg[k] = v + for k, v in lc.items(): if k not in self.cfg.settings: continue @@ -81,7 +86,7 @@ class PasterServerApplication(Application): for k, v in list(cfg.items()): if k.lower() in self.cfg.settings and v is not None: self.cfg.set(k.lower(), v) - + self.configure_logging() def load(self): @@ -109,4 +114,4 @@ def paste_server(app, gcfg=None, host="127.0.0.1", port=None, *args, **kwargs): """ from gunicorn.app.pasterapp import PasterServerApplication - PasterServerApplication(app, gcfg=gcfg, host=host, port=port, *args, **kwargs).run() \ No newline at end of file + PasterServerApplication(app, gcfg=gcfg, host=host, port=port, *args, **kwargs).run() diff --git a/gunicorn/arbiter.py b/gunicorn/arbiter.py index 8ff5740d..5a87f640 100644 --- a/gunicorn/arbiter.py +++ b/gunicorn/arbiter.py @@ -89,7 +89,10 @@ class Arbiter(object): self.worker_class = self.cfg.worker_class if self.cfg.preload_app: - self.app.wsgi() + if not self.cfg.debug: + self.app.wsgi() + else: + self.log.warning("debug mode: app isn't preloaded.") def start(self): """\ diff --git a/gunicorn/config.py b/gunicorn/config.py index 43a84d85..1a7f4afd 100644 --- a/gunicorn/config.py +++ b/gunicorn/config.py @@ -72,8 +72,6 @@ class Config(object): @property def workers(self): - if self.settings['debug'].get(): - return 1 return self.settings['workers'].get() @property