Skip to content

Commit

Permalink
Apply percentage for doc with a len greater than resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
varrialeciro committed Aug 7, 2023
1 parent 4c3172b commit 6672454
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/cat/rabbit_hole.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ def store_documents(self, docs: List[Document], source: str) -> None:
# every percStep send a notification in order to monito the progress
# N.B. file with a len < resolution does not show any percentage
# the storing should be immediate, and it's correct show only the final msg
if ((d+1) % percStep) == 0:
if ((percStep > 0) and ((d+1) % percStep) == 0):
readPercentage += percResolution
self.send_rabbit_thought(f"Read {readPercentage}% of {source}")

Expand Down

0 comments on commit 6672454

Please sign in to comment.