Is there a way to my app know it is being run from webclient.py?
It would be useful, because in this case, my models.py could allocate
my sqlite db file in ramdisk to speed up my tests. BTW, if you use
Ubuntu, you already have a ramdisk in /dev/shm.
This way, my db.py could be something like that:
if not request.env.web2py_runtime_gae:
if its_running_from_webclient:
db = DAL('sqlite://storage.sqlite', folder='/dev/shm/')
else:
db = DAL('sqlite://storage.sqlite')
I've tried using DAL('sqlite:memory') to use SQLite's in memory
database feature with no success.
I think that's because the db lifetime is just for one single request.
Am I right?
Any ideias about these topics?
--
Vinicius Assef
--