mirror of
https://github.com/apache/superset.git
synced 2026-04-18 15:44:57 +00:00
fix: Signature of Celery pruner jobs (#32699)
This commit is contained in:
committed by
GitHub
parent
449f51aed5
commit
df06bdf33b
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user