"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "cloudkitty/db/__init__.py" between
cloudkitty-16.0.0.tar.gz and cloudkitty-17.0.0.tar.gz

About: OpenStack CloudKitty provides Rating-as-a-Service for OpenStack.
The "Zed" series (latest release).

__init__.py  (cloudkitty-16.0.0):__init__.py  (cloudkitty-17.0.0)
skipping to change at line 24 skipping to change at line 24
# under the License. # under the License.
# #
from oslo_config import cfg from oslo_config import cfg
from oslo_db.sqlalchemy import session from oslo_db.sqlalchemy import session
_FACADE = None _FACADE = None
def _create_facade_lazily(): def _create_facade_lazily():
global _FACADE global _FACADE
if _FACADE is None: if _FACADE is None:
_FACADE = session.EngineFacade.from_config(cfg.CONF, sqlite_fk=True) # FIXME(priteau): Remove autocommit=True (and ideally use of
# LegacyEngineFacade) asap since it's not compatible with SQLAlchemy
# 2.0.
_FACADE = session.EngineFacade.from_config(cfg.CONF, sqlite_fk=True,
return _FACADE return _FACADE
def get_engine(): def get_engine():
facade = _create_facade_lazily() facade = _create_facade_lazily()
return facade.get_engine() return facade.get_engine()
def get_session(**kwargs): def get_session(**kwargs):
facade = _create_facade_lazily() facade = _create_facade_lazily()
return facade.get_session(**kwargs) return facade.get_session(**kwargs)
 End of changes. 1 change blocks. 
1 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)