From ff89432d86e28ca878163ee068529d851b434fb8 Mon Sep 17 00:00:00 2001 From: simon Date: Sat, 8 Apr 2023 14:28:03 +0700 Subject: [PATCH] fix off by one task notification error --- tubearchivist/home/src/es/connect.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tubearchivist/home/src/es/connect.py b/tubearchivist/home/src/es/connect.py index fd6e5ab0..5af1838d 100644 --- a/tubearchivist/home/src/es/connect.py +++ b/tubearchivist/home/src/es/connect.py @@ -166,7 +166,7 @@ class IndexPaginate: def _notify(self, processed): """send notification on task""" total = self.kwargs.get("total") - progress = (processed + 1) / total + progress = processed / total index_clean = self.index_name.lstrip("ta_").title() message = [f"Processing {index_clean}s {processed}/{total}"] self.kwargs.get("task").send_progress(message, progress=progress)