Skip to content

Support for threaded and forked Werkzeug servers #57

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions devserver/management/commands/runserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def inner_run():
server_type = 'werkzeug'
else:
server_type = 'django'
print "%s %s server is running at http://%s:%s/" % (options['use_forked'] and 'Forked' or 'Threaded', server_type, addr, port)
print "%s %s server is running at http://%s:%s/" % ('Forked' if options['use_forked'] else 'Threaded', server_type, addr, port)
print "Quit the server with %s." % quit_command

# django.core.management.base forces the locale to en-us. We should
Expand Down Expand Up @@ -172,7 +172,7 @@ def inner_run():
try:
if use_werkzeug:
run_simple(addr, int(port), DebuggedApplication(app, True),
use_reloader=False, use_debugger=True)
use_reloader=False, use_debugger=True, threaded=not options['use_forked'], processes=10 if options['use_forked'] else 1)
else:
run(addr, int(port), app, mixin)
except WSGIServerException, e:
Expand Down