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

[or-cvs] r20348: {torflow} Fix some sleep timeouts for the run_scan script, update the (torflow/branches/stable/NetworkScanners/BwAuthority)



Author: mikeperry
Date: 2009-08-21 12:50:55 -0400 (Fri, 21 Aug 2009)
New Revision: 20348

Modified:
   torflow/branches/stable/NetworkScanners/BwAuthority/README.BwAuthorities
   torflow/branches/stable/NetworkScanners/BwAuthority/bwauthority.py
   torflow/branches/stable/NetworkScanners/BwAuthority/run_scan.sh
Log:

Fix some sleep timeouts for the run_scan script, update the
readme a little, and don't save sqllite db file snapshots.



Modified: torflow/branches/stable/NetworkScanners/BwAuthority/README.BwAuthorities
===================================================================
--- torflow/branches/stable/NetworkScanners/BwAuthority/README.BwAuthorities	2009-08-20 18:02:28 UTC (rev 20347)
+++ torflow/branches/stable/NetworkScanners/BwAuthority/README.BwAuthorities	2009-08-21 16:50:55 UTC (rev 20348)
@@ -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/branches/stable/NetworkScanners/BwAuthority/bwauthority.py
===================================================================
--- torflow/branches/stable/NetworkScanners/BwAuthority/bwauthority.py	2009-08-20 18:02:28 UTC (rev 20347)
+++ torflow/branches/stable/NetworkScanners/BwAuthority/bwauthority.py	2009-08-21 16:50:55 UTC (rev 20348)
@@ -164,7 +164,10 @@
       cond.acquire()
       SQLSupport.tc_session.close()
       try:
-        shutil.copy(sql_file, new_file)
+        #shutil.copy(sql_file, new_file)
+        # No need to copy sql files.. they just take up 
+        # TONS of space.. we're not likely to use them either.
+        pass
       except Exception,e:
         plog("WARN", "Error moving sql file: "+str(e))
       SQLSupport.reset_all()

Modified: torflow/branches/stable/NetworkScanners/BwAuthority/run_scan.sh
===================================================================
--- torflow/branches/stable/NetworkScanners/BwAuthority/run_scan.sh	2009-08-20 18:02:28 UTC (rev 20347)
+++ torflow/branches/stable/NetworkScanners/BwAuthority/run_scan.sh	2009-08-21 16:50:55 UTC (rev 20348)
@@ -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