Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1397 by calling load_wsgi after starting the reloader #1399

Merged
merged 4 commits into from Dec 12, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 2 additions & 3 deletions gunicorn/workers/base.py
Expand Up @@ -112,8 +112,6 @@ def init_process(self):

self.init_signals()

self.load_wsgi()

# start the reloader
if self.cfg.reload and self.cfg.reload != 'off':
def changed(fname):
Expand All @@ -133,6 +131,7 @@ def changed(fname):
self.reloader = reloader_cls(callback=changed)
self.reloader.start()

self.load_wsgi()
self.cfg.post_worker_init(self)

# Enter main run loop
Expand All @@ -143,7 +142,7 @@ def load_wsgi(self):
try:
self.wsgi = self.app.wsgi()
except SyntaxError as e:
if not self.cfg.reload:
if self.cfg.reload == 'off':
raise

self.log.exception(e)
Expand Down