Skip to content

Commit

Permalink
Add check for when reader is rewinded
Browse files Browse the repository at this point in the history
  • Loading branch information
wbrannon committed Aug 14, 2024
1 parent 702e065 commit 9883974
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/fusion_engine_client/parsers/mixed_log_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,9 @@ def _print_progress(self, file_size=None):
if file_size is None:
file_size = min(self.file_size_bytes, self.max_bytes)

if self.total_bytes_read - self.last_print_bytes > 10e6 or self.total_bytes_read == file_size:
if self.total_bytes_read < self.last_print_bytes or \
self.total_bytes_read - self.last_print_bytes > 10e6 or \
self.total_bytes_read == file_size:
elapsed_sec = (datetime.now() - self.start_time).total_seconds()
self.logger.log(logging.INFO if show_progress else logging.DEBUG,
'Processed %d/%d bytes (%.1f%%). [elapsed=%.1f sec, rate=%.1f MB/s]' %
Expand Down

0 comments on commit 9883974

Please sign in to comment.