Hi Gaetan, On Oct 13, 2:29 pm, Gaetan de Menten <[email protected]> wrote: > > We're doing the following now (before setup_all): > > > elixir.session.configure(autoflush=True, transactional=True) > > elixir.session.registry.scopefunc = custom_scope_func > > Well, I didn't dig that far into SQLAlchemy's code. But I thought this > would work until I saw your post on SQLAlchemy's list... Note that a > session is *not* thread-safe, so whatever you are trying to do needs > to take that into account (and that *might* be the reason your test is > failing).
Yes, our different threads are carefully managed not to execute at the same time. (I know, this sounds silly - but is a side effect of a special testing environment.) We have now reverted to importing our own ScopedSession in every module as __session__, and that does the trick for now. After all, that is the support elixir now has for this problem, so we ought to use it instead of trying to push the envelope in some other direction... -i --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "SQLElixir" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sqlelixir?hl=en -~----------~----~----~----~------~----~------~--~---
