mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-10 05:34:36 +00:00
Changed error logging in core_pe.cache because it would sometimes result in huge logs of no value. Also, added debug logging during the analysis of pictures.
This commit is contained in:
parent
e150b26cab
commit
c5bf0f228a
@ -81,9 +81,9 @@ class Cache(object):
|
|||||||
try:
|
try:
|
||||||
self.con.execute(sql, [value, key])
|
self.con.execute(sql, [value, key])
|
||||||
except sqlite.OperationalError:
|
except sqlite.OperationalError:
|
||||||
logging.warning('Picture cache could not set %r for key %r', value, key)
|
logging.warning('Picture cache could not set value for key %r', key)
|
||||||
except sqlite.DatabaseError as e:
|
except sqlite.DatabaseError as e:
|
||||||
logging.warning('DatabaseError while setting %r for key %r: %s', value, key, str(e))
|
logging.warning('DatabaseError while setting value for key %r: %s', key, str(e))
|
||||||
|
|
||||||
def _create_con(self, second_try=False):
|
def _create_con(self, second_try=False):
|
||||||
def create_tables():
|
def create_tables():
|
||||||
|
@ -34,8 +34,9 @@ def prepare_pictures(pictures, cache_path, j=job.nulljob):
|
|||||||
prepared = [] # only pictures for which there was no error getting blocks
|
prepared = [] # only pictures for which there was no error getting blocks
|
||||||
try:
|
try:
|
||||||
for picture in j.iter_with_progress(pictures, tr("Analyzed %d/%d pictures")):
|
for picture in j.iter_with_progress(pictures, tr("Analyzed %d/%d pictures")):
|
||||||
picture.dimensions
|
|
||||||
picture.unicode_path = str(picture.path)
|
picture.unicode_path = str(picture.path)
|
||||||
|
logging.debug("Analyzing picture at {}".format(picture.unicode_path))
|
||||||
|
picture.dimensions # pre-read dimensions
|
||||||
try:
|
try:
|
||||||
if picture.unicode_path not in cache:
|
if picture.unicode_path not in cache:
|
||||||
blocks = picture.get_blocks(BLOCK_COUNT_PER_SIDE)
|
blocks = picture.get_blocks(BLOCK_COUNT_PER_SIDE)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user