0

Add logging regarding whether cached image is used or not

This commit is contained in:
Ryan McCue
2010-12-11 21:32:36 +10:00
parent b7f4855ec6
commit 211f489f66

View File

@@ -327,6 +327,7 @@ class ChunkRenderer(object):
if os.path.getmtime(self.chunkfile) <= os.path.getmtime(oldimg_path):
# chunkfile is older than the image, don't even bother checking
# the hash
logging.debug("Using cached image")
return oldimg_path
# Reasons for the code to get to this point:
@@ -352,6 +353,7 @@ class ChunkRenderer(object):
# Before we return it, update its mtime so the next round
# doesn't have to check the hash
os.utime(dest_path, None)
logging.debug("Using cached image")
return dest_path
else:
# Remove old image for this chunk. Anything already existing is