[imp] added command line option to define if server should be threaded

bzr revid: nicolas.vanhoren@openerp.com-20110916131844-v621bmklo0lvd517
This commit is contained in:
niv-openerp 2011-09-16 15:18:44 +02:00
parent 21e7164400
commit b1d49ca31f
1 changed files with 4 additions and 1 deletions

View File

@ -37,6 +37,9 @@ optparser.add_option("--log-level", dest="log_level",
default='debug', help="Log level", metavar="LOG_LEVEL")
optparser.add_option("--log-config", dest="log_config",
default='', help="Log config file", metavar="LOG_CONFIG")
optparser.add_option('--multi-threaded', dest='threaded',
default=False, action='store_true',
help="Use multiple threads to handle requests")
import web.common.dispatch
@ -55,5 +58,5 @@ if __name__ == "__main__":
werkzeug.serving.run_simple(
'0.0.0.0', options.socket_port, app,
use_reloader=options.reloader, threaded=True)
use_reloader=options.reloader, threaded=options.threaded)