Iwan wrote:
>
> Hi there,
>
> We have a situation where we have an existing ScopedSession, but want
> to change its scopefunc.  This sounds like a strange requirement, it
> is because we use elixir - the issue is discusses here:
> http://groups.google.com/group/sqlelixir/browse_thread/thread/623f190c1784e5e9
>
> How could we do this?  To test, we currently we do:
>
>         elixir.session.registry.scopefunc = lambda: 1
>
> (The default is thread-local)
>
> But we seem to still end up with different sessions in different
> threads.

you have to set that up ahead of time.  by default, the registry evaluates
as a _TLocalRegistry which is hardcoded to threadlocal.

Session = scoped_session(sessionmaker(), scopefunc=lambda: 1)



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to