Log time taken for optonal file download

This commit is contained in:
shortcutme 2017-10-03 15:48:36 +02:00
parent 9b8eeb6a73
commit f45c0b2377
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -496,7 +496,7 @@ class WorkerManager(object):
task["done"] = True task["done"] = True
self.tasks.remove(task) # Remove from queue self.tasks.remove(task) # Remove from queue
if task["optional_hash_id"]: if task["optional_hash_id"]:
self.log.debug("Downloaded optional file, adding to hashfield: %s" % task["inner_path"]) self.log.debug("Downloaded optional file in %.3fs, adding to hashfield: %s" % (time.time() - task["time_started"], task["inner_path"]))
self.site.content_manager.optionalDownloaded(task["inner_path"], task["optional_hash_id"], task["size"]) self.site.content_manager.optionalDownloaded(task["inner_path"], task["optional_hash_id"], task["size"])
self.site.onFileDone(task["inner_path"]) self.site.onFileDone(task["inner_path"])
task["evt"].set(True) task["evt"].set(True)