Skip to content

Commit

Permalink
Better log message for count posts processor
Browse files Browse the repository at this point in the history
  • Loading branch information
stijn-uva committed Aug 24, 2023
1 parent 165420e commit 0e47a9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions processors/metrics/count_posts.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def process(self):
try:
date = get_interval_descriptor(post, timeframe)
except ValueError as e:
self.dataset.update_status("%s, cannot count posts per %s" % (str(e), timeframe), is_final=True)
self.dataset.update_status(f"{e}, cannot count posts per {timeframe}", is_final=True)
self.dataset.update_status(0)
return

Expand All @@ -76,7 +76,7 @@ def process(self):
counter += 1

if counter % 2500 == 0:
self.dataset.update_status("Counted through " + str(counter) + " posts.")
self.dataset.update_status(f"Counted {counter:,} of {self.source_dataset.num_rows:,} items.")
self.dataset.update_progress(counter / self.source_dataset.num_rows)

# pad interval if needed, this is useful if the result is to be
Expand Down

0 comments on commit 0e47a9a

Please sign in to comment.