On 11 Mar 2014, at 9:39 AM, Massimo Di Pierro <[email protected]> 
wrote:
> is db.commit() not enough? It should release all locks.

I wasn't sure, but that'd be easier, yes.

Is a lock reacquired automatically, if I (say) do a table.update()?

> 
> 
> On Tuesday, 11 March 2014 11:01:48 UTC-5, Jonathan Lundell wrote:
> In a controller, what's the best way to: 
> 
> a) access the db 
> b) close the db 
> c) do something that might take a few seconds 
> d) reconnect to the db 
> e) update the db 
> 
> 
> It's steps b & d that I'm asking about; I don't want to hold any database 
> locks during c. 
> 
> I'm currently using BaseAdapter.close_all_instances(), since that's what 
> gluon.main uses, and DAL(...) to reconnect. Is there a better way? Maybe DAL 
> already supports this kind of thing? 


-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to