diff --git a/rhodecode/config/environment.py b/rhodecode/config/environment.py --- a/rhodecode/config/environment.py +++ b/rhodecode/config/environment.py @@ -6,6 +6,7 @@ import logging from mako.lookup import TemplateLookup from pylons.configuration import PylonsConfig from pylons.error import handle_mako_error +from sqlalchemy import engine_from_config import rhodecode.lib.app_globals as app_globals import rhodecode.lib.helpers @@ -16,7 +17,7 @@ from rhodecode.lib.auth import set_avail from rhodecode.lib.utils import repo2db_mapper, make_ui, set_rhodecode_config from rhodecode.model import init_model from rhodecode.model.scm import ScmModel -from sqlalchemy import engine_from_config +from rhodecode.lib.timerproxy import TimerProxy log = logging.getLogger(__name__) @@ -65,7 +66,6 @@ def load_environment(global_conf, app_co # Setup the SQLAlchemy database engine if config['debug'] and not test: #use query time debugging. - from rhodecode.lib.timerproxy import TimerProxy sa_engine_db1 = engine_from_config(config, 'sqlalchemy.db1.', proxy=TimerProxy()) else: