CivicSpleen / ambry

A comprehensive data package manager
BSD 2-Clause "Simplified" License
4 stars 5 forks source link

Separate session for build states configs. #146

Closed ericbusboom closed 8 years ago

ericbusboom commented 8 years ago

However it may be better to have an entirely separate process table.

ALter the dataset.ConfigAccessor so that setting configs uses a separate session. Using the main session conflicts with updates to library data, and when the main session gets into a bad state, it become very hard to write information about the exception, because the session is screwed up.

Also, the ConfigAccess holds the dataset for long term, which can fail when the dataset get expired from a session.

In the bundles, the property setters should include a commit(), since that commit wont commit anything else.

Note: Probably should create a new session against the connection: http://docs.sqlalchemy.org/en/rel_1_0/orm/session_basics.html#creating-ad-hoc-session-objects-with-alternate-arguments