[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [torflow/master] Bug #4268: Remove sleeping from bw auths



commit 09ac2ca82478f1f1cd2a776a936feecd5d7e9c7a
Author: Mike Perry <mikeperry-git@xxxxxxxxxx>
Date:   Wed Nov 9 14:00:50 2011 -0800

    Bug #4268: Remove sleeping from bw auths
    
    Code is still there, just disabling via config, and adding a check to ensure
    the time isn't negative.
---
 NetworkScanners/BwAuthority/bwauthority_child.py   |    5 ++++-
 .../BwAuthority/data/scanner.1/bwauthority.cfg     |    2 +-
 .../BwAuthority/data/scanner.2/bwauthority.cfg     |    2 +-
 .../BwAuthority/data/scanner.3/bwauthority.cfg     |    2 +-
 .../BwAuthority/data/scanner.4/bwauthority.cfg     |    2 +-
 5 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/NetworkScanners/BwAuthority/bwauthority_child.py b/NetworkScanners/BwAuthority/bwauthority_child.py
index 1527a11..c42e163 100755
--- a/NetworkScanners/BwAuthority/bwauthority_child.py
+++ b/NetworkScanners/BwAuthority/bwauthority_child.py
@@ -216,7 +216,10 @@ def speedrace(hdlr, start_pct, stop_pct, circs_per_node, save_every, out_dir,
     t0 = time.time()
     if sleep_start <= t0 and t0 <= sleep_stop:
       plog("NOTICE", "It's bedtime. Sleeping for "+str(round((sleep_stop-t0)/3600.0,1))+"h")
-      time.sleep(sleep_stop - t0)
+      try:
+        time.sleep(sleep_stop - t0)
+      except:
+        pass
       t0 = time.time()
 
     hdlr.new_exit()
diff --git a/NetworkScanners/BwAuthority/data/scanner.1/bwauthority.cfg b/NetworkScanners/BwAuthority/data/scanner.1/bwauthority.cfg
index abd8e1e..5d986d0 100644
--- a/NetworkScanners/BwAuthority/data/scanner.1/bwauthority.cfg
+++ b/NetworkScanners/BwAuthority/data/scanner.1/bwauthority.cfg
@@ -25,4 +25,4 @@ circs_per_node = 5
 min_streams = 1
 max_fetch_time = 300
 sleep_start = 01:30
-sleep_stop = 04:30
+sleep_stop = 01:30
diff --git a/NetworkScanners/BwAuthority/data/scanner.2/bwauthority.cfg b/NetworkScanners/BwAuthority/data/scanner.2/bwauthority.cfg
index 9b7b591..a9544a1 100644
--- a/NetworkScanners/BwAuthority/data/scanner.2/bwauthority.cfg
+++ b/NetworkScanners/BwAuthority/data/scanner.2/bwauthority.cfg
@@ -25,4 +25,4 @@ circs_per_node = 5
 min_streams = 1
 max_fetch_time = 300
 sleep_start = 01:30
-sleep_stop = 04:30
+sleep_stop = 01:30
diff --git a/NetworkScanners/BwAuthority/data/scanner.3/bwauthority.cfg b/NetworkScanners/BwAuthority/data/scanner.3/bwauthority.cfg
index 51dfdc5..7999781 100644
--- a/NetworkScanners/BwAuthority/data/scanner.3/bwauthority.cfg
+++ b/NetworkScanners/BwAuthority/data/scanner.3/bwauthority.cfg
@@ -25,4 +25,4 @@ circs_per_node = 5
 min_streams = 1
 max_fetch_time = 300
 sleep_start = 01:30
-sleep_stop = 04:30
+sleep_stop = 01:30
diff --git a/NetworkScanners/BwAuthority/data/scanner.4/bwauthority.cfg b/NetworkScanners/BwAuthority/data/scanner.4/bwauthority.cfg
index 94342a2..c21be4f 100644
--- a/NetworkScanners/BwAuthority/data/scanner.4/bwauthority.cfg
+++ b/NetworkScanners/BwAuthority/data/scanner.4/bwauthority.cfg
@@ -25,4 +25,4 @@ circs_per_node = 5
 min_streams = 1
 max_fetch_time = 300
 sleep_start = 01:30
-sleep_stop = 04:30
+sleep_stop = 01:30



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits