[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)
@@ -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 2009-03-29Z23:44:14

This archive was generated by hypermail 2.2.0 : 2009-07-10Z19:18:12 GMT