[mirrorbrain-commits] [opensuse-svn] r6943 - trunk/tools/download-redirector-v2/mirrordoctor/mb

From: Novell Forge SVN <noreply_at_novell.com>
Date: Sun, 29 Mar 2009 17:43:11 -0600 (MDT)
Author: poeml
Date: 2009-03-29 17:43:09 -0600 (Sun, 29 Mar 2009)
New Revision: 6943

Modified:
   trunk/tools/download-redirector-v2/mirrordoctor/mb/vacuum.py
Log:
mb vacuum:
- Make output a little easier to understand.
- Remove superfluous semicolons from SQL statements.


Modified: trunk/tools/download-redirector-v2/mirrordoctor/mb/vacuum.py
===================================================================
--- trunk/tools/download-redirector-v2/mirrordoctor/mb/vacuum.py	2009-03-29 23:30:09 UTC (rev 6942)
+++ trunk/tools/download-redirector-v2/mirrordoctor/mb/vacuum.py	2009-03-29 23:43:09 UTC (rev 6943)
_at_@ -4,19 +4,19 @@
 
     n_file_total = conn.Filearr.select().count()
 
-    query = "SELECT count(*) FROM filearr WHERE mirrors = '{}';"
+    query = "SELECT count(*) FROM filearr WHERE mirrors = '{}'"
     n_file_stale = conn.Filearr._connection.queryAll(query)[0]
 
 
-    print 'file total:                   %10d' % n_file_total
-    print 'file stale:                   %10d' % n_file_stale
+    print 'Total files:                     %10d' % n_file_total
+    print 'Stale files (not on any mirror): %10d' % n_file_stale
 
 
 def vacuum(conn):
     """delete stale file entries from the database"""
 
     print 'Deleting stale files...'
-    query = "DELETE FROM filearr WHERE mirrors = '{}';"
+    query = "DELETE FROM filearr WHERE mirrors = '{}'"
     conn.Filearr._connection.query(query)
 
     print 'Done.'

_______________________________________________
Opensuse-svn mailing list
Opensuse-svn_at_forge.novell.com
http://forge.novell.com/mailman/listinfo/opensuse-svn


_______________________________________________
mirrorbrain-commits mailing list
Archive: http://mirrorbrain.org/archive/mirrorbrain-commits/

Note: To remove yourself from this list, send a mail with the content
 	unsubscribe
to the address mirrorbrain-commits-request_at_mirrorbrain.org
Received on Sun Mar 29 2009 - 23:44:14 GMT

This archive was generated by hypermail 2.3.0 : Mon Feb 20 2012 - 23:47:04 GMT