Merge branch 'master' of git://git.assembla.com/fpdboz

This commit is contained in:
sqlcoder
2009-08-07 00:12:22 +01:00
7 changed files with 960 additions and 4 deletions
+5 -2
View File
@@ -132,6 +132,9 @@ class Importer:
# self.updated = time()
def clearFileList(self):
self.updatedsize = {}
self.updatetime = {}
self.pos_in_file = {}
self.filelist = {}
def closeDBs(self):
@@ -199,7 +202,7 @@ class Importer:
print "Started at", start, "--", len(self.filelist), "files to import.", self.settings['dropIndexes']
if self.settings['dropIndexes'] == 'auto':
self.settings['dropIndexes'] = self.calculate_auto2(self.database, 12.0, 500.0)
if self.settings['dropHudCache'] == 'auto':
if 'dropHudCache' in self.settings and self.settings['dropHudCache'] == 'auto':
self.settings['dropHudCache'] = self.calculate_auto2(self.database, 25.0, 500.0) # returns "drop"/"don't drop"
if self.settings['dropIndexes'] == 'drop':
@@ -241,7 +244,7 @@ class Importer:
self.database.afterBulkImport()
else:
print "No need to rebuild indexes."
if self.settings['dropHudCache'] == 'drop':
if 'dropHudCache' in self.settings and self.settings['dropHudCache'] == 'drop':
self.database.rebuild_hudcache()
else:
print "No need to rebuild hudcache."