Mercurial > kallithea
changeset 3232:99c093d1a142 beta
run waitress check on startup
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sat, 26 Jan 2013 22:19:26 +0100 |
parents | b5a5a60608a7 |
children | 11b005b2d5e8 |
files | rhodecode/config/environment.py rhodecode/lib/db_manage.py rhodecode/websetup.py |
diffstat | 3 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/config/environment.py Sat Jan 26 22:15:40 2013 +0100 +++ b/rhodecode/config/environment.py Sat Jan 26 22:19:26 2013 +0100 @@ -20,6 +20,7 @@ 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 @@ #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.')
--- a/rhodecode/lib/db_manage.py Sat Jan 26 22:15:40 2013 +0100 +++ b/rhodecode/lib/db_manage.py Sat Jan 26 22:19:26 2013 +0100 @@ -704,7 +704,8 @@ reg_perm.permission = perm self.sa.add(reg_perm) - def finish(self): + @staticmethod + def check_waitress(): """ Function executed at the end of setup """
--- a/rhodecode/websetup.py Sat Jan 26 22:15:40 2013 +0100 +++ b/rhodecode/websetup.py Sat Jan 26 22:19:26 2013 +0100 @@ -48,4 +48,4 @@ dbmanage.populate_default_permissions() Session().commit() load_environment(conf.global_conf, conf.local_conf, initial=True) - dbmanage.finish() + DbManage.check_waitress()