re-add hash_queue_size function

This commit is contained in:
Jack Robison 2018-03-29 15:06:08 -04:00
parent 789ca3693f
commit 51662b1e5b
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -39,6 +39,9 @@ class DHTHashAnnouncer(object):
self.hash_queue.remove(blob_hash)
defer.returnValue(result)
def hash_queue_size(self):
return len(self.hash_queue)
def _show_announce_progress(self, size, start):
queue_size = len(self.hash_queue)
average_blobs_per_second = float(size - queue_size) / (self.clock.seconds() - start)