djangosnippets.org: Latest snippets posted by piohttps://djangosnippets.org/users/pio/2011-05-20T15:39:27.902324-05:00pioModel Locking Mixin & Decorator (MySQL Advisory Locks)
2011-05-20T15:39:27.902324-05:00piohttps://djangosnippets.org/snippets/2443/<p>This code provides a mixin and decorator which, when used together, can provide advisory locking on model methods. It provides locking by using MySQL's advisory lock system. See the example at the bottom of the code.<br />
</p>
<p>This is a convenient and easy way to guarantee your model methods have exclusive …</p>
Freely redistributable