[pylons-discuss] Re: pyramid_tm - is there an acceptable way to unjoin the transaction and use explicit commits?

2020-02-07 Thread Jonathan Vanasco
> > `request.tm.commit()`, `request.tm.abort()` and `request.tm.begin()` > instead of `request.dbsession.commit()`. Thanks, Michael. This obvious answer is what I'll use. I am very familiar with Celery and task runners, and have a few app using it with Pyramid. In this particular

Re: [pylons-discuss] pyramid_tm - is there an acceptable way to unjoin the transaction and use explicit commits?

2020-02-07 Thread Michael Merickel
pyramid_tm does have a configurable activate_hook that you can use to turn off the TM for certain endpoints. You would need to coordinate that with something else that managed the transaction. If I were doing it myself I'd probably configure my activate hook to return true/false based on an custom

Re: [pylons-discuss] pyramid_tm - is there an acceptable way to unjoin the transaction and use explicit commits?

2020-02-07 Thread Mikko Ohtamaa
one of my apps uses pyramid_tm, but has reached a point where one (possibly > two) views (out of dozens) need to make explicit commits with the > SqlAlchemy session. > Because this does not fit well in the view/request model, I would usually try to offload these tasks to a worker processes