[Twisted-Python] database transaction commit

Phil Mayers p.mayers at imperial.ac.uk
Wed Oct 11 19:58:12 EDT 2006

Marvin McNett wrote:
> In the adbapi documentation it says, "In all cases a database 
> transaction will be commited after your database usage is finished, 
> unless an exception is raised in which case it will be rolled back."
> So, I'm wondering when my database usage is actually finished.  In the 
> example there, would it be after the call to '_getAge' or after the call 
> to 'printResult' (i.e. after the callable to runInteraction or after the 
> last callback attached to the deferred)?

I believe if runInteraction returns (as opposed to excepting) then the 
transaction has committed?

More information about the Twisted-Python mailing list