Laurence Rowe wrote:
Martijn Faassen wrote:
Hey Laurence,

Laurence Rowe wrote:
We'll have to stick with scoped sesssions because of threading, but the engine as local utility pattern should still work.

Session = scoped_session(sessionmaker(bind=LookupEngine('my-engine')...))
engine = EngineUtility(url='sqlite:///')
provideUtility(engine, IConnectable, 'my-engine') # but normally a local utility registration

from myapplication import Session
session = Session()

Would session = ISession(context) be a reasonable way for grok to handle this?

Making transactions span multiple instances of a single app seems impossible otherwise, though maybe that is an edge case that need not be supported.


Zope-Dev maillist  -
**  No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to