tools: Skip checks in recursive management calls.

This commit is contained in:
Tim Abbott 2024-09-24 11:03:19 -07:00
parent edef41ca32
commit 9d74abee0b
3 changed files with 4 additions and 2 deletions

View File

@ -103,6 +103,7 @@ class Database:
"DJANGO_SETTINGS_MODULE=" + self.settings, "DJANGO_SETTINGS_MODULE=" + self.settings,
"ZULIP_DB_NAME=" + self.database_name, "ZULIP_DB_NAME=" + self.database_name,
"./manage.py", "./manage.py",
"--skip-checks",
] ]
run([*manage_py, "migrate", "--no-input"]) run([*manage_py, "migrate", "--no-input"])
@ -309,6 +310,7 @@ def get_migration_status(**options: Any) -> str:
no_color=options.get("no_color", False), no_color=options.get("no_color", False),
settings=options.get("settings", os.environ["DJANGO_SETTINGS_MODULE"]), settings=options.get("settings", os.environ["DJANGO_SETTINGS_MODULE"]),
stdout=out, stdout=out,
skip_checks=options.get("skip_checks", True),
traceback=options.get("traceback", True), traceback=options.get("traceback", True),
verbosity=verbosity, verbosity=verbosity,
) )

View File

@ -58,7 +58,7 @@ import a database dump from one or more JSON files."""
parser.formatter_class = argparse.RawTextHelpFormatter parser.formatter_class = argparse.RawTextHelpFormatter
def do_destroy_and_rebuild_database(self, db_name: str) -> None: def do_destroy_and_rebuild_database(self, db_name: str) -> None:
call_command("flush", verbosity=0, interactive=False) call_command("flush", verbosity=0, skip_checks=True, interactive=False)
subprocess.check_call([os.path.join(settings.DEPLOY_ROOT, "scripts/setup/flush-memcached")]) subprocess.check_call([os.path.join(settings.DEPLOY_ROOT, "scripts/setup/flush-memcached")])
@override @override

View File

@ -1116,7 +1116,7 @@ class Command(ZulipBaseCommand):
if not options["test_suite"]: if not options["test_suite"]:
# We populate the analytics database here for # We populate the analytics database here for
# development purpose only # development purpose only
call_command("populate_analytics_db") call_command("populate_analytics_db", skip_checks=True)
threads = options["threads"] threads = options["threads"]
jobs: list[tuple[int, list[list[int]], dict[str, Any], int]] = [] jobs: list[tuple[int, list[list[int]], dict[str, Any], int]] = []