fix off by one task notification error
This commit is contained in:
parent
fb77ab44ee
commit
ff89432d86
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue