mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-21 02:01:31 +00:00
offloaded: add fetched-percentage to the log message
This commit is contained in:
parent
500934b72f
commit
8bea663fb2
@ -366,10 +366,15 @@ class CHKCiphertextFetcher(AskUntilSuccessMixin):
|
||||
fetch_size = min(needed, self.CHUNK_SIZE)
|
||||
if fetch_size == 0:
|
||||
return True # all done
|
||||
self.log(format="fetching %(start)d-%(end)d of %(total)d",
|
||||
percent = 0
|
||||
if self._expected_size:
|
||||
percent = 1.0 * (self._have+fetch_size) / self._expected_size
|
||||
percent = int(100*percent)
|
||||
self.log(format="fetching %(start)d-%(end)d of %(total)d (%(percent)d%%)",
|
||||
start=self._have,
|
||||
end=self._have+fetch_size,
|
||||
total=self._expected_size,
|
||||
percent=percent,
|
||||
level=log.NOISY)
|
||||
d = self.call("read_encrypted", self._have, fetch_size)
|
||||
def _got_data(ciphertext_v):
|
||||
|
Loading…
x
Reference in New Issue
Block a user