| 51 | local_conf['bind'] = host.split(',') |
| 52 | |
| 53 | class PasterServerApplication(WSGIApplication): |
| 54 | def load_config(self): |
| 55 | self.cfg.set("default_proc_name", config_file) |
| 56 | |
| 57 | if has_logging_config(config_file): |
| 58 | self.cfg.set("logconfig", config_file) |
| 59 | |
| 60 | if gunicorn_config_file: |
| 61 | self.load_config_from_file(gunicorn_config_file) |
| 62 | else: |
| 63 | default_gunicorn_config_file = get_default_config_file() |
| 64 | if default_gunicorn_config_file is not None: |
| 65 | self.load_config_from_file(default_gunicorn_config_file) |
| 66 | |
| 67 | for k, v in local_conf.items(): |
| 68 | if v is not None: |
| 69 | self.cfg.set(k.lower(), v) |
| 70 | |
| 71 | def load(self): |
| 72 | return app |
| 73 | |
| 74 | PasterServerApplication().run() |