#14050: Signals for transaction commit/rollback
-----------------------------------------------+----------------------------
 Reporter:  Ask Solem <a...@celeryproject.org>  |       Owner:  nobody    
   Status:  new                                |   Milestone:            
Component:  Database layer (models, ORM)       |     Version:  1.2       
 Keywords:                                     |       Stage:  Unreviewed
Has_patch:  0                                  |  
-----------------------------------------------+----------------------------
 Some users of django-celery have the problem of publishing references to
 database state that has not yet been commited.

 E.g:

     def add_user(request):
         user = User.objects.create(...)
         # Import the users address book contacts
         import_contacts.delay(user.pk)


 The proposed solution is to add a way to delay these calls until the
 transaction is committed:

     from djcelery import on_transaction_commit

     def add_user(request):
         user = User.objects.create(...)
         on_transaction_commit(import_contacts.delay, user.pk)

 This doesn't seem very easy to accomplish, as I can't see any mechanism
 to hook into commit/rollback. Do you think it could be possible
 to add new signals for this?

-- 
Ticket URL: <http://code.djangoproject.com/ticket/14050>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to