[Twisted-Python] deferred graph?

exarkun at twistedmatrix.com exarkun at twistedmatrix.com
Tue Jul 17 15:53:52 EDT 2012


On 03:40 pm, drsalists at gmail.com wrote:
>>
>>Strangely, this doesn't give the report until after the sleep
>>finishes...   ?

What's strange about that?  "time.sleep(10)" doesn't mean "immediately 
print out debug information".  It means "do not do anything at all in 
this program for around 10 seconds".
>>It turned out that I needed to print 
>>d._debugInfo._getDebugTracebacks(),
>rather than just running d._debugInfo._getDebugTracebacks().
>
>However, it always appears to print the debug tracebacks for the 
>deferred
>named - in this case, d.  It doesn't appear to be selecting the correct
>deferred(s) to print.

All it does is print the debug information for the Deferred you got the 
_debugInfo attribute from.  It doesn't understand your code or know 
where the source of your error is.  It's just a function that gives you 
the stack traces associated with a particular Deferred.

If you want a different stack trace, call the method on a _debugInfo 
from a different Deferred object.

Jean-Paul



More information about the Twisted-Python mailing list