On Sunday, May 31, 2015 at 4:48:09 AM UTC-4, Fayaz Yusuf Khan wrote:
I do the former in cases which involve very long transactions. (Batch
uploads and processing. I'm counting batch and background tasks as part of
the controller layer here.)
I manage transactions manually in the
On Tuesday, May 26, 2015 at 11:04:34 PM UTC+5:30, Jonathan Vanasco wrote:
It is incredibly non-standard to have more than one transaction within a
given request. It is also relatively non-standard to explicitly manage
transactions in the application code.
I do both of those (the former
In most implementations, the answer would be: None of the above.
Many MVC style frameworks (including all the near variants) will place the
SqlAlchemy session management in a WSGI middleware layer or a tween.
Usually it will look like (pseudocode):
try: