##// END OF EJS Templates
db: Move database initialization up to pyramid....
johbo -
r115:be1c5590 default
parent child Browse files
Show More
@@ -145,10 +145,6 b' def load_environment(global_conf, app_co'
145 145 protocol=utils.get_vcs_server_protocol(config),
146 146 log_level=config['vcs.server.log_level'])
147 147
148 # MULTIPLE DB configs
149 # Setup the SQLAlchemy database engine
150 utils.initialize_database(config)
151
152 148 set_available_permissions(config)
153 149 db_cfg = make_db_config(clear_session=True)
154 150
@@ -36,7 +36,7 b' from routes.middleware import RoutesMidd'
36 36 import routes.util
37 37
38 38 import rhodecode
39 from rhodecode.config import patches
39 from rhodecode.config import patches, utils
40 40 from rhodecode.config.environment import load_environment
41 41 from rhodecode.lib.middleware import csrf
42 42 from rhodecode.lib.middleware.appenlight import wrap_in_appenlight_if_enabled
@@ -157,6 +157,11 b' def make_pyramid_app(global_config, **se'
157 157 # behavior in the old application.
158 158 settings_pylons = settings.copy()
159 159
160 # TODO: Remove this by refactoring the init DB function.
161 # Put debug flag into settings for DB setup.
162 settings['debug'] = global_config.get('debug', False)
163 utils.initialize_database(settings)
164
160 165 sanitize_settings_and_apply_defaults(settings)
161 166 config = Configurator(settings=settings)
162 167 add_pylons_compat_data(config.registry, global_config, settings_pylons)
General Comments 0
You need to be logged in to leave comments. Login now