##// END OF EJS Templates
run waitress check on startup
marcink -
r3232:99c093d1 beta
parent child Browse files
Show More
@@ -20,6 +20,7 b' from rhodecode.lib.auth import set_avail'
20 from rhodecode.lib.utils import repo2db_mapper, make_ui, set_rhodecode_config,\
20 from rhodecode.lib.utils import repo2db_mapper, make_ui, set_rhodecode_config,\
21 load_rcextensions, check_git_version
21 load_rcextensions, check_git_version
22 from rhodecode.lib.utils2 import engine_from_config, str2bool
22 from rhodecode.lib.utils2 import engine_from_config, str2bool
23 from rhodecode.lib.db_manage import DbManage
23 from rhodecode.model import init_model
24 from rhodecode.model import init_model
24 from rhodecode.model.scm import ScmModel
25 from rhodecode.model.scm import ScmModel
25
26
@@ -88,7 +89,7 b' def load_environment(global_conf, app_co'
88
89
89 #check git version
90 #check git version
90 check_git_version()
91 check_git_version()
91
92 DbManage.check_waitress()
92 # MULTIPLE DB configs
93 # MULTIPLE DB configs
93 # Setup the SQLAlchemy database engine
94 # Setup the SQLAlchemy database engine
94 sa_engine_db1 = engine_from_config(config, 'sqlalchemy.db1.')
95 sa_engine_db1 = engine_from_config(config, 'sqlalchemy.db1.')
@@ -704,7 +704,8 b' class DbManage(object):'
704 reg_perm.permission = perm
704 reg_perm.permission = perm
705 self.sa.add(reg_perm)
705 self.sa.add(reg_perm)
706
706
707 def finish(self):
707 @staticmethod
708 def check_waitress():
708 """
709 """
709 Function executed at the end of setup
710 Function executed at the end of setup
710 """
711 """
@@ -48,4 +48,4 b' def setup_app(command, conf, vars):'
48 dbmanage.populate_default_permissions()
48 dbmanage.populate_default_permissions()
49 Session().commit()
49 Session().commit()
50 load_environment(conf.global_conf, conf.local_conf, initial=True)
50 load_environment(conf.global_conf, conf.local_conf, initial=True)
51 dbmanage.finish()
51 DbManage.check_waitress()
General Comments 0
You need to be logged in to leave comments. Login now