Re: [pylons-discuss] Re: How to send task-message after request.tm has committed?

2018-06-01 Thread jens . troeger
Hello Thierry, You are talking about these data managers: http://zodb.readthedocs.io/en/latest/transactions.html#data-managers Correct? Other than the Mailer it seems a little difficult to find more verbose documentation? I have played a little more

Re: [pylons-discuss] Re: How to send task-message after request.tm has committed?

2018-06-01 Thread Thierry Florac
Hi, Maybe you should have a look at the "DataManager" component interface provided by the "transaction" package. This kind of component allows you to include your hook in a "two-phase commit" transaction safely. Several implementations are available, for example in the "repoze.sendmail" package...

[pylons-discuss] Re: How to send task-message after request.tm has committed?

2018-05-31 Thread jens . troeger
Poking around the documentation some more, it seems that using an after-commit-hook may work: i.e. when a task needs to be scheduled by the view function, then find the request’s transaction (from `request.tm`?) and