« Previous | Next » 

Revision 1c11bace

ID1c11bace3822cccc2084132dbd47452e41a1e3ef

Added by Christos Stavrakakis over 9 years ago

Re-implement select_for_update

Previous implementation of 'select_for_update' method was based on an
attribute of the 'ForUpdateManager'. However, the model manager is shared
between all threads, which lead to race conditions. This commit
reimplements 'select_for_update', by making it return a custom QuerySet
(ForUpdateQuerySet), which overrides the 'get' and 'filter' methods.

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences