From 89530c0d3241bfe8df0c60653f76f58bc099cd14 Mon Sep 17 00:00:00 2001 From: Sergei Rybakov Date: Mon, 30 Dec 2024 13:03:27 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20progress=20tracking=20in?= =?UTF-8?q?=20http=20downloads=20(#920)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix http progress --- lamindb_setup/core/upath.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/lamindb_setup/core/upath.py b/lamindb_setup/core/upath.py index 58e0d072..a45efd94 100644 --- a/lamindb_setup/core/upath.py +++ b/lamindb_setup/core/upath.py @@ -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: