Changeset - 99c093d1a142
[Not reviewed]
beta
0 3 0
Marcin Kuzminski - 13 years ago 2013-01-26 22:19:26
marcin@python-works.com
run waitress check on startup
3 files changed with 5 insertions and 3 deletions:
0 comments (0 inline, 0 general)
rhodecode/config/environment.py
Show inline comments
 
@@ -17,12 +17,13 @@ from rhodecode.config.routing import mak
 

	
 
from rhodecode.lib import helpers
 
from rhodecode.lib.auth import set_available_permissions
 
from rhodecode.lib.utils import repo2db_mapper, make_ui, set_rhodecode_config,\
 
    load_rcextensions, check_git_version
 
from rhodecode.lib.utils2 import engine_from_config, str2bool
 
from rhodecode.lib.db_manage import DbManage
 
from rhodecode.model import init_model
 
from rhodecode.model.scm import ScmModel
 

	
 
log = logging.getLogger(__name__)
 

	
 

	
 
@@ -85,13 +86,13 @@ def load_environment(global_conf, app_co
 
        # set RC_WHOOSH_TEST_DISABLE=1 to disable whoosh index during tests
 
        if not int(os.environ.get('RC_WHOOSH_TEST_DISABLE', 0)):
 
            create_test_index(TESTS_TMP_PATH, config, True)
 

	
 
    #check git version
 
    check_git_version()
 

	
 
    DbManage.check_waitress()
 
    # MULTIPLE DB configs
 
    # Setup the SQLAlchemy database engine
 
    sa_engine_db1 = engine_from_config(config, 'sqlalchemy.db1.')
 
    init_model(sa_engine_db1)
 

	
 
    repos_path = make_ui('db').configitems('paths')[0][1]
rhodecode/lib/db_manage.py
Show inline comments
 
@@ -701,13 +701,14 @@ class DbManage(object):
 
                .filter(UserToPerm.user == default_user).scalar():
 
                reg_perm = UserToPerm()
 
                reg_perm.user = default_user
 
                reg_perm.permission = perm
 
                self.sa.add(reg_perm)
 

	
 
    def finish(self):
 
    @staticmethod
 
    def check_waitress():
 
        """
 
        Function executed at the end of setup
 
        """
 
        if not __py_version__ >= (2, 6):
 
            notify('Python2.5 detected, please switch '
 
                   'egg:waitress#main -> egg:Paste#http '
rhodecode/websetup.py
Show inline comments
 
@@ -45,7 +45,7 @@ def setup_app(command, conf, vars):
 
    dbmanage.create_default_user()
 
    dbmanage.admin_prompt()
 
    dbmanage.create_permissions()
 
    dbmanage.populate_default_permissions()
 
    Session().commit()
 
    load_environment(conf.global_conf, conf.local_conf, initial=True)
 
    dbmanage.finish()
 
    DbManage.check_waitress()
0 comments (0 inline, 0 general)