[Twisted-Python] database transaction commit

Thomas HERVE therve at free.fr
Fri Oct 13 09:43:13 EDT 2006

Quoting Marvin McNett <mmcnett at cs.ucsd.edu>:

> 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)?

The transaction will be commited when the deferred returned by 
runInteraction will  be fired. It means in the *first* callback 
(printResult) you can expected it to be finished.


More information about the Twisted-Python mailing list