Feature request: post/pre commit/rollback signals

2014-01-10 Thread Jesús Espino
Hi folks! The propose is add post and pre signals for commit and rollback actions (as sqlalchemy orm events). This allows attach some code when a transaction is committed or rolled back. I have some problem, such as send email only when a transaction is committed successfully, and it's can be don

Re: Feature request: post/pre commit/rollback signals

2014-01-10 Thread Andreas Pelme
On 10 jan 2014, at 09:19, Jesús Espino wrote: > Hi folks! > > The propose is add post and pre signals for commit and rollback actions (as > sqlalchemy orm events). This allows attach some code when a transaction is > committed or rolled back. > > I have some problem, such as send email only

Re: Feature request: post/pre commit/rollback signals

2014-01-11 Thread Andrey Antukh
Hi! In my opinion, "the default case are solved with atomic block" seems to be a workaround instead of a solution. I understand that signals in general are evil and register global callbacks is not a very good solution, but I think, that a orm should give some generic facility to attach code to ex

Re: Feature request: post/pre commit/rollback signals

2014-01-11 Thread Aymeric Augustin
On 11 janv. 2014, at 11:05, Andrey Antukh wrote: > In my opinion, "the default case are solved with atomic block" seems to be a > workaround instead of a solution. As a short reminder, we’re talking about inconsistencies that arise when: 1) you do something in the database; 2) you do something

Re: Feature request: post/pre commit/rollback signals

2014-01-13 Thread Andrey Antukh
Thanks for your package and clear explanation ;) Greetings. Andrey. 2014/1/11 Aymeric Augustin > On 11 janv. 2014, at 11:05, Andrey Antukh wrote: > > > In my opinion, "the default case are solved with atomic block" seems to > be a workaround instead of a solution. > > As a short reminder, we’

Re: Feature request: post/pre commit/rollback signals

2014-01-18 Thread Carl Meyer
Hi, Those interested in this feature may find django-transaction-hooks [1] useful. It is my attempt to implement the commonly-useful case (run some code after the current transaction successfully commits, providing the code wasn't registered during a savepoint which was later rolled back.) I th

Re: Feature request: post/pre commit/rollback signals

2014-01-18 Thread Aymeric Augustin
On 18 janv. 2014, at 19:50, Carl Meyer wrote: > Those interested in this feature may find django-transaction-hooks [1] > useful. It is my attempt to implement the commonly-useful case (run some code > after the current transaction successfully commits, providing the code wasn't > registered du

Re: Feature request: post/pre commit/rollback signals

2014-01-18 Thread Andrey Antukh
Hi! 2014/1/18 Aymeric Augustin > On 18 janv. 2014, at 19:50, Carl Meyer wrote: > > > Those interested in this feature may find django-transaction-hooks [1] > useful. It is my attempt to implement the commonly-useful case (run some > code after the current transaction successfully commits, provi

Re: Feature request: post/pre commit/rollback signals

2014-01-18 Thread Anssi Kääriäinen
On Saturday, January 18, 2014 9:02:41 PM UTC+2, Aymeric Augustin wrote: > > On 18 janv. 2014, at 19:50, Carl Meyer > > wrote: > > > Those interested in this feature may find django-transaction-hooks [1] > useful. It is my attempt to implement the commonly-useful case (run some > code after the

Re: Feature request: post/pre commit/rollback signals

2014-01-18 Thread Carl Meyer
On 01/18/2014 01:19 PM, Anssi Kääriäinen wrote: > On Saturday, January 18, 2014 9:02:41 PM UTC+2, Aymeric Augustin wrote: > > On 18 janv. 2014, at 19:50, Carl Meyer > wrote: > > > Those interested in this feature may find django-transaction-hooks > [1] useful. It is my attempt to