fix: Signature of Celery pruner jobs (#32699)

This commit is contained in:
Michael S. Molina
2025-03-17 13:52:31 -03:00
committed by GitHub
parent 449f51aed5
commit df06bdf33b
3 changed files with 23 additions and 13 deletions

View File

@@ -69,7 +69,7 @@ class QueryPruneCommand(BaseCommand):
total_rows = len(ids_to_delete)
logger.info("Total rows to be deleted: %s", total_rows)
logger.info("Total rows to be deleted: %s", f"{total_rows:,}")
next_logging_threshold = 1
@@ -92,7 +92,7 @@ class QueryPruneCommand(BaseCommand):
if percentage_complete >= next_logging_threshold:
logger.info(
"Deleted %s rows from the query table older than %s days (%d%% complete)", # noqa: E501
total_deleted,
f"{total_deleted:,}",
self.retention_period_days,
percentage_complete,
)
@@ -102,7 +102,9 @@ class QueryPruneCommand(BaseCommand):
minutes, seconds = divmod(elapsed_time, 60)
formatted_time = f"{int(minutes):02}:{int(seconds):02}"
logger.info(
"Pruning complete: %s rows deleted in %s", total_deleted, formatted_time
"Pruning complete: %s rows deleted in %s",
f"{total_deleted:,}",
formatted_time,
)
def validate(self) -> None: