restart-server: Add a --only-django for rolling Django restarts.

This commit is contained in:
Alex Vandiver
2024-10-08 15:21:34 +00:00
committed by Tim Abbott
parent 4451db08c3
commit 44fde64c42
2 changed files with 38 additions and 33 deletions

View File

@@ -691,11 +691,17 @@ def start_arg_parser(action: str, add_help: bool = False) -> argparse.ArgumentPa
parser.add_argument(
"--skip-checks", action="store_true", help="Skip syntax and database checks"
)
parser.add_argument(
which_services = parser.add_mutually_exclusive_group()
which_services.add_argument(
"--skip-client-reloads",
action="store_true",
help="Do not send reload events to web clients",
)
which_services.add_argument(
"--only-django",
action="store_true",
help=f"Only {action} Django (not Tornado or workers)",
)
if action == "restart":
parser.add_argument(
"--less-graceful",