]> git.phdru.name Git - m_librarian.git/blobdiff - m_librarian/glst.py
Fix(glst): Return counter after VACUUM
[m_librarian.git] / m_librarian / glst.py
index cf581b1d14c1f0c6a1a70891fbb291b4f5f31971..6b2e0904157870d2de8c52298e31a64b736c3a0a 100755 (executable)
@@ -50,13 +50,15 @@ def _import_glst():
     connection = sqlhub.processConnection
     if connection.dbName == 'postgres':
         connection.query("VACUUM %s" % Genre.sqlmeta.table)
-    elif connection.dbName == 'sqlite':
-        connection.query("VACUUM")
     return old_fb2 + old_nonfb2, new_fb2 + new_nonfb2
 
 
 def import_glst():
-    return sqlhub.doInTransaction(_import_glst)
+    count_old, count_new = sqlhub.doInTransaction(_import_glst)
+    connection = sqlhub.processConnection
+    if connection.dbName == 'sqlite':
+        connection.query("VACUUM")
+    return count_old, count_new
 
 
 def test():