[Twisted-web] Re: Nevow + adbapi

Luis N tegmine at gmail.com
Wed Mar 23 12:15:26 MST 2005


On Tue, 22 Mar 2005 15:21:33 +1100, Andrew Bennetts
<andrew-twisted at puzzling.org> wrote:

> addCallback returns the Deferred, not the result of the callback.  It has 
> to; the callback normally won't have been run yet, because the Deferred
> won't have been fired yet.
> 
> -Andrew.

Thank you, I thought that may have been what was happening. You've
very nicely explained the concept of deferreds. I'll take another read
through the "deferreds are beautiful" doc.

Just one more question, where should I place dbpool =
adbapi.ConnectionPool(), so that I don't open a new connection every
xmlrpc call.

Or, for three calls, is this normal at server shutdown. 

2005/03/23 19:13 GMT [-] adbapi closing: psycopg
2005/03/23 19:13 GMT [-] adbapi closing: psycopg
2005/03/23 19:13 GMT [-] adbapi closing: psycopg



More information about the Twisted-web mailing list