Skip to content

Commit

Permalink
🩹 Fix progress tracking in http downloads (#920)
Browse files Browse the repository at this point in the history
fix http progress
  • Loading branch information
Koncopd authored Dec 30, 2024
1 parent 152cd07 commit 89530c0
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions lamindb_setup/core/upath.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,15 @@ def relative_update(self, inc=1):
def update_relative_value(self, inc=1):
if inc != 0:
self.value += inc
# this is specific to http filesystem
# for some reason the last update is 0 always
# here 100% is forced manually in this case
elif self.value >= 0.999:
self.value = self.size
self.call()
self.call()
else:
# this is specific to http filesystem
# for some reason the last update is 0 always
# sometimes the reported result is less that 100%
# here 100% is forced manually in this case
if self.value < 1.0 and self.value >= 0.999:
self.value = self.size
self.call()

def branch(self, path_1, path_2, kwargs):
if self.adjust_size:
Expand Down

0 comments on commit 89530c0

Please sign in to comment.