[or-cvs] r20349: {torflow} Fix some sleep timeouts for the run_scan script and update t (torflow/trunk/NetworkScanners/BwAuthority)

mikeperry at seul.org mikeperry at seul.org
Fri Aug 21 16:53:45 UTC 2009


Author: mikeperry
Date: 2009-08-21 12:53:45 -0400 (Fri, 21 Aug 2009)
New Revision: 20349

Modified:
   torflow/trunk/NetworkScanners/BwAuthority/README.BwAuthorities
   torflow/trunk/NetworkScanners/BwAuthority/run_scan.sh
Log:

Fix some sleep timeouts for the run_scan script and update 
the readme a little.



Modified: torflow/trunk/NetworkScanners/BwAuthority/README.BwAuthorities
===================================================================
--- torflow/trunk/NetworkScanners/BwAuthority/README.BwAuthorities	2009-08-21 16:50:55 UTC (rev 20348)
+++ torflow/trunk/NetworkScanners/BwAuthority/README.BwAuthorities	2009-08-21 16:53:45 UTC (rev 20349)
@@ -86,9 +86,9 @@
 7. Spot-check ./run_scan.sh
 
 This is the script that will launch the scanners. By default, it
-launches four in parallel, and expects the git checkout of the
-rs-format-fix branch to be in ../../../tor.git/, and the SQLAlchemy
-extraction to be in ../../../SQLAlchemy-0.5.5
+launches four in parallel, and expects the git checkout to be in 
+../../../tor.git/, and the SQLAlchemy extraction to be in 
+../../../SQLAlchemy-0.5.5
 
 Again, note that this is the same directory that contains the
 torflow checkout directory.

Modified: torflow/trunk/NetworkScanners/BwAuthority/run_scan.sh
===================================================================
--- torflow/trunk/NetworkScanners/BwAuthority/run_scan.sh	2009-08-21 16:50:55 UTC (rev 20348)
+++ torflow/trunk/NetworkScanners/BwAuthority/run_scan.sh	2009-08-21 16:53:45 UTC (rev 20349)
@@ -11,11 +11,16 @@
 
 killall bwauthority.py
 
+KILLED_TOR=false
+
 for i in data/scanner.*
 do
   if [ -f "$i/tor.pid" ]; then
     PID=`cat $i/tor.pid`
     kill $PID
+    if [ $? -eq 0 ]; then
+      KILLED_TOR=true
+    fi
   fi
 done
 
@@ -36,7 +41,14 @@
 
 # If this is a fresh start, we should allow the tors time to download
 # new descriptors.
-sleep 60
+if [ $KILLED_TOR ]; then
+  echo "Waiting for 60 seconds to refresh tors..."
+  sleep 60
+else
+  echo "We did not kill any Tor processes from any previous runs.. Waiting for
+5 min to fetch full consensus.."
+  sleep 300
+fi
 
 export PYTHONPATH
 



More information about the tor-commits mailing list