db.py is usually a model, so it gets executed once per request. 
Enabling WAL is a thing needed just one time only (that "setting" gets 
stored in the sqlite database file). When you "reopen" the file WAL is 
already been activated.
There is no other activity involved once the database file has been created 
and "WAL-enabled". As long as you don't create sqlite databases on the fly, 
I'd not put that piece of code anywhere. 
If you're in the need of something to assure when deploying a new app or a 
new db, you can make a "setup" controller that, once hit, enables WAL, but 
that's pretty much about it.

On Wednesday, July 29, 2015 at 3:15:25 PM UTC+2, jackso...@quantachrome.com 
wrote:
>
> thats once per database I assume. Can I put it in db.py to have it 
> executed once?
>
> On Friday, July 24, 2015 at 4:52:26 PM UTC-4, jackso...@quantachrome.com 
> wrote:
>>
>> The docs say that web2py locks a sqlite3 database file always...even if 
>> just reading. Is there a way to circumvent this so that my database writing 
>> process does have to wait for web2py reading the database?
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to