mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-31 15:06:32 +02:00
Allow create portfolio script to run for multiple
This commit is contained in:
parent
5b7a6678c6
commit
725441da70
2 changed files with 66 additions and 80 deletions
|
@ -192,7 +192,7 @@ class PopulateScriptTemplate(ABC):
|
|||
class TerminalHelper:
|
||||
@staticmethod
|
||||
def log_script_run_summary(
|
||||
to_update, failed_to_update, skipped, debug: bool, log_header=None, display_as_str=False
|
||||
to_update, failed_to_update, skipped, debug: bool, log_header=None, skipped_header=None, display_as_str=False
|
||||
):
|
||||
"""Prints success, failed, and skipped counts, as well as
|
||||
all affected objects."""
|
||||
|
@ -203,6 +203,9 @@ class TerminalHelper:
|
|||
if log_header is None:
|
||||
log_header = "============= FINISHED ==============="
|
||||
|
||||
if skipped_header is None:
|
||||
skipped_header = "----- SOME DATA WAS INVALID (NEEDS MANUAL PATCHING) -----"
|
||||
|
||||
# Prepare debug messages
|
||||
if debug:
|
||||
updated_display = [str(u) for u in to_update] if display_as_str else to_update
|
||||
|
@ -236,7 +239,7 @@ class TerminalHelper:
|
|||
f"""{TerminalColors.YELLOW}
|
||||
{log_header}
|
||||
Updated {update_success_count} entries
|
||||
----- SOME DATA WAS INVALID (NEEDS MANUAL PATCHING) -----
|
||||
{skipped_header}
|
||||
Skipped updating {update_skipped_count} entries
|
||||
{TerminalColors.ENDC}
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue