[or-cvs] [ernie/master] Keep the past two consensus health statuses.
karsten at torproject.org
karsten at torproject.org
Fri Apr 16 10:42:02 UTC 2010
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date: Fri, 16 Apr 2010 12:41:10 +0200
Subject: Keep the past two consensus health statuses.
Commit: 50710cbce0b67a76e54d1b1ea957c95486e6c806
---
src/ConsensusHealthChecker.java | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/src/ConsensusHealthChecker.java b/src/ConsensusHealthChecker.java
index f62e0b4..91d7768 100644
--- a/src/ConsensusHealthChecker.java
+++ b/src/ConsensusHealthChecker.java
@@ -226,6 +226,20 @@ public class ConsensusHealthChecker {
try {
+ /* Keep the past two consensus health statuses. */
+ File file0 = new File("website/consensus-health.html");
+ File file1 = new File("website/consensus-health-1.html");
+ File file2 = new File("website/consensus-health-2.html");
+ if (file2.exists()) {
+ file2.delete();
+ }
+ if (file1.exists()) {
+ file1.renameTo(file2);
+ }
+ if (file0.exists()) {
+ file0.renameTo(file1);
+ }
+
/* Start writing web page. */
BufferedWriter bw = new BufferedWriter(
new FileWriter("website/consensus-health.html"));
--
1.6.5
More information about the tor-commits
mailing list