Are running this within a controller or a background process? In the 
executesql case, are you just replacing the select() line or doing 
something else? Is only this one table locked or is the entire appadmin 
locked?

There should be no difference between 
using  process=db(db.process.status=="pending").select().first() or 
db.executesql('select....'). But there is a difference on where the code is 
executed. If the loop:wait is executed in a controller, it will lock the 
user session thus appadmin and every access to the application.

On Monday, 28 May 2012 08:34:59 UTC-5, simon wrote:
>
> If I use the DAL select on a sqlite database to select a record then it 
> locks the table even if no records are found.  If I change it to 
> db.executesql(....) then it does not lock the table. For example:
>
> while not process:
>            time.sleep(30)
>            process=db(db.process.status=="pending").select().first()
>
> If there are no records found the table stays locked so it cannot even be 
> viewed in appadmin.
>
> Is this what is expected/desirable? Is there a way to release the lock?
>
>

Reply via email to