On Saturday, January 18, 2014 9:02:41 PM UTC+2, Aymeric Augustin wrote:
>
> On 18 janv. 2014, at 19:50, Carl Meyer <ca...@oddbird.net <javascript:>> 
> 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 during a savepoint which was later rolled back.) I think 
> the API provided by django-transaction-hooks is actually better for that 
> use case than transaction signals are, since it does the work of handling 
> some situations correctly (savepoints, closed connections), which in the 
> case of signals are left up to the signal receiver to handle (or more 
> likely, not bother to handle.) 
> > 
> > Testing and feedback welcome. If this becomes widely used and seems to 
> fill a need, I think there is a chance it could become part of Django core. 
> (See #21803.) 
>
> I think this is the right approach. I would use that package. I support 
> adding it to Django. 
>

If documentation warns clearly that there is no guarantee whatsoever that 
the hook is always ran after commit +1 for addition in Django. The most 
obvious case of abuse for this sort of hook is doing something business 
critical in the post-commit hook. It must be clear that this is not a 
substitute for two phase commit or other ways of avoiding 
crash-just-after-commit problem.

 - Anssi

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/574600c8-2aba-4ac6-bb19-f28e0a13a46d%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to