[Twisted-Python] [cpushare at cpushare.com: CPUShare Exception]

Jp Calderone exarkun at divmod.com
Thu Jul 7 11:06:51 EDT 2005


On Thu, 7 Jul 2005 10:42:12 -0400, glyph at divmod.com wrote:
>
>
>On Thu, 7 Jul 2005 16:23:13 +0200, Andrea Arcangeli <andrea at cpushare.com> 
>wrote:
>>On Thu, Jul 07, 2005 at 08:48:59AM -0400, glyph at divmod.com wrote:
>>>It seems like you might want to filter more than just OpenSSL.SSL.Error 
>>>;).
>>
>>very likely ;), but I guess I can wait until some harmless annoyance
>>trigger like in this case.
>>
>>The number of emails the server sends me has a maximum of 10, to avoid
>>getting the same exception too many times (and the max number of sms is
>>1). So even something goes wrong and I'm on vacation I don't risk to
>>fill the inbox ;)
>
>Rather than a simple counter, why not hash tracebacks so they are not sent 
>more than once?  For example:

This tends to work poorly for most tracebacks.  As soon as you have one that contains an object with a default repr, the ID section makes each hash different.

When I did this, I settled on hashing just the qual of the exception class and the brief string (failure.getErrorMessage()) version of it.  This has a similar problem, but seems to work ok in practice.

Jp




More information about the Twisted-Python mailing list