Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions dojo/auditlog.py
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,16 @@ def process_model_backfill(
"""
if progress_callback is None:
def progress_callback(msg, style=None):
logger.info(msg)
if style == "ERROR":
logger.error(msg)
elif style == "WARNING":
logger.warning(msg)
elif style == "SUCCESS":
logger.info(msg)
elif style == "DEBUG":
logger.debug(msg)
else:
logger.info(msg)

try:
table_name, event_table_name = get_table_names(model_name)
Expand All @@ -790,7 +799,7 @@ def progress_callback(msg, style=None):
progress_callback(
f" Event table {event_table_name} not found. "
f"Is {model_name} tracked by pghistory?",
"ERROR",
"DEBUG",
)
return 0, 0.0

Expand Down
2 changes: 2 additions & 0 deletions dojo/db_migrations/0250_pghistory_backfill.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ def progress_callback(msg, style=None):
logger.warning(msg)
elif style == "SUCCESS":
logger.info(msg)
elif style == "DEBUG":
logger.debug(msg)
else:
logger.info(msg)

Expand Down
2 changes: 2 additions & 0 deletions dojo/db_migrations/0257_pghistory_tags_backfill.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ def progress_callback(msg, style=None):
logger.warning(msg)
elif style == "SUCCESS":
logger.info(msg)
elif style == "DEBUG":
logger.debug(msg)
else:
logger.info(msg)

Expand Down