Thanks Michael.
For what it's worth, I ended up doing this:
# thread local storage
tls = threading.local()
# Add custom code to measure the time we spend on the current thread
waiting
# to get a DB connection from the pool. We do this by defining a decorator
# and monkey-patching the relevant
On Thu, Feb 20, 2014 at 5:22 PM, Jonathan Vanasco jonat...@findmeon.com wrote:
this seems to work, but I want to just make sure this is the intended
behavior.
a = dbSession.query( Something ).filter( Something.primary_key == 1
).first()
b = dbSession.query( Something ).get( 1 )
c =
that's fine. this is for a webapp where we have in a single request :
begin;
user = .filter().first()
DO LOTS OF STUFF, all over the place
DO EVEN MORE STUFF , in more places
user = .get(user_id)
commit;
if this behavior is intended, then we can just rely on it for now.
On Feb 20, 2014, at 3:22 PM, Jonathan Vanasco jonat...@findmeon.com wrote:
this seems to work, but I want to just make sure this is the intended
behavior.
a = dbSession.query( Something ).filter( Something.primary_key == 1
).first()
b = dbSession.query( Something ).get( 1 )
c