commit afb2c6e47302602a135576c1de33019df4eacd0e Author: Damian Johnson atagar@torproject.org Date: Wed Oct 2 07:42:38 2013 -0700
Rate limiting recommended version notifications
Limiting notifications about the recommended versions being out of sync to once per day. In practice authorities look to be out of sync for 4-6 hours after they change their recommended versions, and giving multiple notifications of this is unhelpful. --- consensus_health_checker.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/consensus_health_checker.py b/consensus_health_checker.py index 45e6f64..12bb451 100755 --- a/consensus_health_checker.py +++ b/consensus_health_checker.py @@ -230,7 +230,8 @@ def different_recommended_client_version(latest_consensus, consensuses, votes): differences.append(msg)
if differences: - return Issue.for_msg(Runlevel.NOTICE, 'DIFFERENT_RECOMMENDED_VERSION', 'client', ', '.join(differences)) + if rate_limit_notice('different_recommended_versions.client', days = 1): + return Issue.for_msg(Runlevel.NOTICE, 'DIFFERENT_RECOMMENDED_VERSION', 'client', ', '.join(differences))
def different_recommended_server_version(latest_consensus, consensuses, votes): @@ -244,7 +245,8 @@ def different_recommended_server_version(latest_consensus, consensuses, votes): differences.append(msg)
if differences: - return Issue.for_msg(Runlevel.NOTICE, 'DIFFERENT_RECOMMENDED_VERSION', 'server', ', '.join(differences)) + if rate_limit_notice('different_recommended_versions.server', days = 1): + return Issue.for_msg(Runlevel.NOTICE, 'DIFFERENT_RECOMMENDED_VERSION', 'server', ', '.join(differences))
def _version_difference_str(authority, consensus_versions, vote_versions):
tor-commits@lists.torproject.org