Skip to content

Commit

Permalink
Fix logging outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
hellais committed Apr 26, 2024
1 parent 8fe6117 commit 7c7f958
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion oonipipeline/src/oonipipeline/temporal/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def maybe_delete_prev_range(db: ClickhouseConnection, prev_range: PrevRange):
q_args["max_created_at"] = prev_range.max_created_at
q_args["min_created_at"] = prev_range.min_created_at
where = f"{where} AND created_at <= %(max_created_at)s AND created_at >= %(min_created_at)s"
log.info(f"runing {where} with {q_args}")
log.debug(f"runing {where} with {q_args}")

q = f"ALTER TABLE {prev_range.table_name} DELETE "
final_query = q + where
Expand Down
8 changes: 4 additions & 4 deletions oonipipeline/src/oonipipeline/temporal/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,14 +439,14 @@ async def run(self, params: BackfillWorkflowParams) -> dict:
day = res["day"]
total_obs_count += res["obs_count"]

obs_per_sec = round(total_obs_count / t.s / 10**6, 1)
obs_per_sec = round(total_obs_count / t.s, 1)
log.info(
f"finished processing {day} speed: {total_obs_count} obs ({obs_per_sec}obs/s)"
f"finished processing {day} in {t.pretty} total_obs_count={total_obs_count} ({obs_per_sec}obs/s)"
)

obs_per_sec = round(total_obs_count / t.s / 10**6, 1)
obs_per_sec = round(total_obs_count / t.s, 1)
log.info(
f"finished processing {day} speed: {total_obs_count} obs ({obs_per_sec}obs/s)"
f"finished processing {day} in {t.pretty} total_obse_count={total_obs_count} ({obs_per_sec}obs/s)"
)

return {
Expand Down

0 comments on commit 7c7f958

Please sign in to comment.