[Twisted-Python] deferred graph?

Dan Stromberg drsalists at gmail.com
Tue Jul 17 11:40:06 EDT 2012

On Mon, Jul 16, 2012 at 11:45 PM, Dan Stromberg <drsalists at gmail.com> wrote:

> On Mon, Jul 16, 2012 at 11:20 PM, Andrew Bennetts <andrew at bemusement.org>wrote:
>> Dan Stromberg wrote:
>> […]
>> > I'm playing with twisted.internet.defer.setDebugging now.
>> >
>> > Is there a corresponding function that can be used to produce its
>> report?
>> > If I use it in a program with an infinite loop, it seems like I never
>> get
>> > the report, but if I use it in a program with a finite length, I
>> eventually
>> > get a useful-looking report.
>> It's triggered by garbage collection of a Deferred with an unhandled
>> error.  So
>> you're at the mercy of when the garbage collector of your Python VM
>> decides to
>> collect that object.
>> You could call yourDeferred._debugInfo._getDebugTracebacks() yourself,
>> though,
>> if you don't mind (ab)using private attributes that might break without
>> warning.
> Strangely, this doesn't give the report until after the sleep
> finishes...   ?
> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20120717/17627d45/attachment.htm 

More information about the Twisted-Python mailing list