diff --git a/rhodecode/config/environment.py b/rhodecode/config/environment.py --- a/rhodecode/config/environment.py +++ b/rhodecode/config/environment.py @@ -20,6 +20,7 @@ from rhodecode.lib.auth import set_avail 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 @@ -88,7 +89,7 @@ def load_environment(global_conf, app_co #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.') diff --git a/rhodecode/lib/db_manage.py b/rhodecode/lib/db_manage.py --- a/rhodecode/lib/db_manage.py +++ b/rhodecode/lib/db_manage.py @@ -704,7 +704,8 @@ class DbManage(object): reg_perm.permission = perm self.sa.add(reg_perm) - def finish(self): + @staticmethod + def check_waitress(): """ Function executed at the end of setup """ diff --git a/rhodecode/websetup.py b/rhodecode/websetup.py --- a/rhodecode/websetup.py +++ b/rhodecode/websetup.py @@ -48,4 +48,4 @@ def setup_app(command, conf, vars): dbmanage.populate_default_permissions() Session().commit() load_environment(conf.global_conf, conf.local_conf, initial=True) - dbmanage.finish() + DbManage.check_waitress()