[tor-commits] [doctor/master] Rate limiting notices about authorities being down to once per day

atagar at torproject.org atagar at torproject.org
Fri Sep 20 15:45:35 UTC 2013


commit 98da21e63a83ad20e77d0672a99b95771ef2d03a
Author: Damian Johnson <atagar at torproject.org>
Date:   Fri Sep 20 08:50:31 2013 -0700

    Rate limiting notices about authorities being down to once per day
    
    Presently turtles is down causing a flood of notifications to
    tor-consensus-health at . Toning this down, reporting this more than once per day
    is unhelpful.
---
 consensus_health_checker.py |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/consensus_health_checker.py b/consensus_health_checker.py
index 01f805b..6c78880 100755
--- a/consensus_health_checker.py
+++ b/consensus_health_checker.py
@@ -577,7 +577,9 @@ def _get_documents(label, resource):
       msg = "Unable to retrieve the %s from %s (%s): %s" % (label, authority, query.download_url, exc)
 
       log.info(msg)
-      issues.append(Issue(Runlevel.ERROR, msg))
+
+      if rate_limit_notice('authority_unavailable.%s' % authority, days = 1):
+        issues.append(Issue(Runlevel.ERROR, msg))
 
   return documents, issues
 



More information about the tor-commits mailing list