On Thu, Jun 28, 2012 at 12:08 AM, Anthony <[email protected]> wrote: > SQLite is a file-based database, so has to have more course locking than a > typical client/server database. Other databases have "select for update" > functionality, which allows you to select a set of records and lock them. > web2py actually supports this, via .select(..., for_update=True).
Thanks, "for_update" is not documented in The Book, but is exactly what I am looking for. Checking the gluon code for Version 1.99.7 (2012-03-04 22:12:08) stable shows that SQLite tries to support 'for_update', unfortunately it doesn't work (causes an exception). So far as I could tell by searching, that wasn't already reported so I created a new issue: http://code.google.com/p/web2py/issues/detail?id=864 for it. > Anyway, you might be better off looking into using the scheduler, or a > third-party task queue like Celery (a web2py Celery plugin was started at > some point, though not sure it is complete). I don't understand, how will that let me do a read-modify-update transaction? It seems as if for_update is precisely what I need to do that. Thanks, -Doug

