Add basic support for Trainwreck database connectivity

This commit is contained in:
Lance Edgar 2017-05-12 23:14:30 -05:00
parent 17f9e6d4a9
commit f02d6d4b16
2 changed files with 5 additions and 0 deletions

View file

@ -39,6 +39,7 @@ Session = scoped_session(sessionmaker(class_=SessionBase, rattail_config=None, r
# not necessarily used, but here if you need it
TempmonSession = scoped_session(sessionmaker())
TrainwreckSession = scoped_session(sessionmaker())
class TailboneSessionDataManager(datamanager.SessionDataManager):
@ -148,6 +149,8 @@ def register(session, initial_state=datamanager.STATUS_ACTIVE,
if tuple(int(x) for x in sa.__version__.split('.')) >= (0, 7):
register(Session)
register(TempmonSession)
register(TrainwreckSession)
else:
Session.configure(extension=ZopeTransactionExtension())
TempmonSession.configure(extension=ZopeTransactionExtension())
TrainwreckSession.configure(extension=ZopeTransactionExtension())