1. I had a concern a few months ago when doing an audit of code. I ended
up not having an issue, but this link might be of help:
https://groups.google.com/d/topic/sqlalchemy/Z7tMCB_IK1M/discussion
2. I use `add_finished_callback`, which runs unconditionally at the end of
every request.
request.add_finished_callback(cleanup_db_session)
Actually, I think this may be caused or exacerbated by your use of
`NewRespsone`. I think that event can be triggered multiple times during a
single request, and if you generate multiple response objects, only the
first one would have an active connection.
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.