# HG changeset patch # User Marcin Kuzminski # Date 2012-07-13 19:17:38 # Node ID 7b092b919f4f6419463b7ee1353d5da40534c911 # Parent bf17b1e4a19c83bfba207512a4ea5ddc77e49142 Switch to waitress wsgi server by default in rhodecode. - waitress is fast, handles chunked encoding correctly (needed for git) - waitress works on linux and windows - it's now default because it can handle git properly out of the box. diff --git a/development.ini b/development.ini --- a/development.ini +++ b/development.ini @@ -30,15 +30,16 @@ pdebug = false [server:main] ##nr of threads to spawn -threadpool_workers = 5 +#threadpool_workers = 5 ##max request before thread respawn -threadpool_max_requests = 10 +#threadpool_max_requests = 10 ##option to use threads of process -use_threadpool = true +#use_threadpool = true -use = egg:Paste#http +#use = egg:Paste#http +use = egg:waitress#main host = 0.0.0.0 port = 5000 @@ -47,7 +48,7 @@ use = egg:rhodecode full_stack = true static_files = true # Optional Languages -# en, fr, pt_BR, zh_CN, zh_TW +# en, fr, ja, pt_BR, zh_CN, zh_TW lang = en cache_dir = %(here)s/data index_dir = %(here)s/data/index diff --git a/production.ini b/production.ini --- a/production.ini +++ b/production.ini @@ -30,15 +30,16 @@ pdebug = false [server:main] ##nr of threads to spawn -threadpool_workers = 5 +#threadpool_workers = 5 ##max request before thread respawn -threadpool_max_requests = 10 +#threadpool_max_requests = 10 ##option to use threads of process -use_threadpool = true +#use_threadpool = true -use = egg:Paste#http +#use = egg:Paste#http +use = egg:waitress#main host = 127.0.0.1 port = 8001 @@ -47,7 +48,7 @@ use = egg:rhodecode full_stack = true static_files = true # Optional Languages -# en, fr, pt_BR, zh_CN, zh_TW +# en, fr, ja, pt_BR, zh_CN, zh_TW lang = en cache_dir = %(here)s/data index_dir = %(here)s/data/index diff --git a/rhodecode/config/deployment.ini_tmpl b/rhodecode/config/deployment.ini_tmpl --- a/rhodecode/config/deployment.ini_tmpl +++ b/rhodecode/config/deployment.ini_tmpl @@ -30,15 +30,16 @@ pdebug = false [server:main] ##nr of threads to spawn -threadpool_workers = 5 +#threadpool_workers = 5 ##max request before thread respawn -threadpool_max_requests = 10 +#threadpool_max_requests = 10 ##option to use threads of process -use_threadpool = true +#use_threadpool = true -use = egg:Paste#http +#use = egg:Paste#http +use = egg:waitress#main host = 127.0.0.1 port = 5000 diff --git a/rhodecode/model/pull_request.py b/rhodecode/model/pull_request.py --- a/rhodecode/model/pull_request.py +++ b/rhodecode/model/pull_request.py @@ -25,19 +25,17 @@ import logging import binascii + from pylons.i18n.translation import _ +from rhodecode.model.meta import Session from rhodecode.lib import helpers as h from rhodecode.model import BaseModel -from rhodecode.model.db import PullRequest, PullRequestReviewers, Notification,\ - ChangesetStatus +from rhodecode.model.db import PullRequest, PullRequestReviewers, Notification from rhodecode.model.notification import NotificationModel from rhodecode.lib.utils2 import safe_unicode from rhodecode.lib.vcs.utils.hgcompat import discovery -from rhodecode.model.changeset_status import ChangesetStatusModel -from rhodecode.model.comment import ChangesetCommentsModel -from rhodecode.model.meta import Session log = logging.getLogger(__name__) diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -33,6 +33,7 @@ callback = lambda V: ('.'.join(map(str, is_windows = __platform__ in _get_meta_var('PLATFORM_WIN', _metadata) requirements = [ + "waitress==0.8.1", "Pylons==1.0.0", "Beaker==1.6.3", "WebHelpers==1.3", @@ -49,7 +50,7 @@ requirements = [ "markdown==2.1.1", "docutils==0.8.1", "simplejson==2.5.2", - "mock" + "mock", ] if sys.version_info < (2, 6): diff --git a/test.ini b/test.ini --- a/test.ini +++ b/test.ini @@ -30,15 +30,16 @@ pdebug = false [server:main] ##nr of threads to spawn -threadpool_workers = 5 +#threadpool_workers = 5 ##max request before thread respawn -threadpool_max_requests = 2 +#threadpool_max_requests = 2 ##option to use threads of process -use_threadpool = true +#use_threadpool = true -use = egg:Paste#http +#use = egg:Paste#http +use = egg:waitress#main host = 127.0.0.1 port = 5000