Skip to content

Commit

Permalink
Only update progress every 1000 downloaded blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
kubilus1 committed Oct 27, 2023
1 parent 6897712 commit 7f5b3f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion autoortho/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,8 @@ def _show_progress(self, block_num, block_size, total_size):
MBps = (total_fetched/1048576) / elapsed
cur_activity['pcnt_done'] = pcnt_done
cur_activity['MBps'] = MBps
print(f"\r{pcnt_done:.2f}% {MBps:.2f} MBps", end='')
if block_num % 1000 == 0:
print(f"\r{pcnt_done:.2f}% {MBps:.2f} MBps", end='')
cur_activity['status'] = f"Downloading {self.dl_url}\n{pcnt_done:.2f}% {MBps:.2f} MBps"

def check(self):
Expand Down

0 comments on commit 7f5b3f2

Please sign in to comment.