Database, Importer: Convert print to log.info
This commit is contained in:
parent
1e0a1a6ad8
commit
9f64602338
|
@ -1586,7 +1586,7 @@ class Database:
|
||||||
self.connection.set_isolation_level(1) # go back to normal isolation level
|
self.connection.set_isolation_level(1) # go back to normal isolation level
|
||||||
self.commit()
|
self.commit()
|
||||||
atime = time() - stime
|
atime = time() - stime
|
||||||
print _("Analyze took %.1f seconds") % (atime,)
|
log.info(_("Analyze took %.1f seconds") % (atime,))
|
||||||
#end def analyzeDB
|
#end def analyzeDB
|
||||||
|
|
||||||
def vacuumDB(self):
|
def vacuumDB(self):
|
||||||
|
|
|
@ -239,7 +239,7 @@ class Importer:
|
||||||
if self.settings['dropIndexes'] == 'drop':
|
if self.settings['dropIndexes'] == 'drop':
|
||||||
self.database.prepareBulkImport()
|
self.database.prepareBulkImport()
|
||||||
else:
|
else:
|
||||||
log.debug(_("No need to drop indexes."))
|
log.info(_("No need to drop indexes."))
|
||||||
#print "dropInd =", self.settings['dropIndexes'], " dropHudCache =", self.settings['dropHudCache']
|
#print "dropInd =", self.settings['dropIndexes'], " dropHudCache =", self.settings['dropHudCache']
|
||||||
|
|
||||||
if self.settings['threads'] <= 0:
|
if self.settings['threads'] <= 0:
|
||||||
|
@ -277,11 +277,11 @@ class Importer:
|
||||||
if self.settings['dropIndexes'] == 'drop':
|
if self.settings['dropIndexes'] == 'drop':
|
||||||
self.database.afterBulkImport()
|
self.database.afterBulkImport()
|
||||||
else:
|
else:
|
||||||
print _("No need to rebuild indexes.")
|
log.info (_("No need to rebuild indexes."))
|
||||||
if 'dropHudCache' in self.settings and self.settings['dropHudCache'] == 'drop':
|
if 'dropHudCache' in self.settings and self.settings['dropHudCache'] == 'drop':
|
||||||
self.database.rebuild_hudcache()
|
self.database.rebuild_hudcache()
|
||||||
else:
|
else:
|
||||||
print _("No need to rebuild hudcache.")
|
log.info (_("No need to rebuild hudcache."))
|
||||||
self.database.analyzeDB()
|
self.database.analyzeDB()
|
||||||
endtime = time()
|
endtime = time()
|
||||||
return (totstored, totdups, totpartial, toterrors, endtime-starttime)
|
return (totstored, totdups, totpartial, toterrors, endtime-starttime)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user