Re: Allow deferral of ModelSignal callback invocation until after transaction commit

2015-05-03 Thread Andreas Pelme
> On 3 maj 2015, at 15:44, Christopher Adams > wrote: > > So unless anyone has objections, I'm going to put my branch on hold for now. > If anyone still wants me to see if there's a way it can work I'm willing to > give it a bit more work, however I think it

Re: Allow deferral of ModelSignal callback invocation until after transaction commit

2015-05-03 Thread Christopher Adams
Shai, Thanks for the note. I thought about what you wrote a bit. I find your points compelling. I don't like the consequences of my proposed changes in terms of: 1. Error handling. The exceptions would be raised at the end of the transaction block and there's no simple way to handle them

Re: Allow deferral of ModelSignal callback invocation until after transaction commit

2015-05-02 Thread Shai Berger
Hi, On Saturday 02 May 2015 07:20:00 Christopher Adams wrote: > Hey guys, > > Thanks for the great feedback and replies. > > Generally agree with everyone that post-commit hooks shouldn't be strictly > coupled to the signals framework philosophically speaking. > > I disagree with Carl's

Re: Allow deferral of ModelSignal callback invocation until after transaction commit

2015-05-01 Thread Christopher Adams
Hey guys, Thanks for the great feedback and replies. Generally agree with everyone that post-commit hooks shouldn't be strictly coupled to the signals framework philosophically speaking. I disagree with Carl's premise that using `connection.on_commit` in your signal handler is simpler than

Re: Allow deferral of ModelSignal callback invocation until after transaction commit

2015-05-01 Thread Christopher Adams
Hey guys, Thanks for the great feedback and replies. Generally agree with everyone that post-commit hooks shouldn't be strictly coupled to the signals framework philosophically speaking. I disagree with Carl's premise that using `connection.on_commit` in your signal handler is simpler than

Re: Allow deferral of ModelSignal callback invocation until after transaction commit

2015-05-01 Thread Andreas Pelme
Hi, > On 30 apr 2015, at 18:42, Carl Meyer wrote: > > transaction-hooks is actually fairly small and understandable too. And I > don't think it's hard to use for this situation, either; you'd just need > to use `connection.on_commit` in your signal handler if you wanted to >

Re: Allow deferral of ModelSignal callback invocation until after transaction commit

2015-04-30 Thread Carl Meyer
Hi Andrew, On 04/30/2015 06:13 AM, Andrew Godwin wrote: > I agree that perhaps making it part of signals is not in everyone's > favour (as signals are kind of unloved) but I also like the simplicity > of Christopher's approach - the patch is small and understandable, and > using it is pretty easy

Re: Allow deferral of ModelSignal callback invocation until after transaction commit

2015-04-30 Thread Andrew Godwin
I agree that perhaps making it part of signals is not in everyone's favour (as signals are kind of unloved) but I also like the simplicity of Christopher's approach - the patch is small and understandable, and using it is pretty easy (especially to upgrade existing code into "safe" code). Unless

Re: Allow deferral of ModelSignal callback invocation until after transaction commit

2015-04-27 Thread Aymeric Augustin
> On 27 avr. 2015, at 16:17, Christopher Adams > wrote: > > So wrote anĀ  > RFC > >

Re: Allow deferral of ModelSignal callback invocation until after transaction commit

2015-04-27 Thread Carl Meyer
Hi, On 04/27/2015 08:17 AM, Christopher Adams wrote: > So wrote an > RFC > > and a > prototype >

Allow deferral of ModelSignal callback invocation until after transaction commit

2015-04-27 Thread Christopher Adams
So wrote an RFC and a prototype