upgrade: Call start-server rather than restart-server if we stopped it.

This saves a little time, and thus causes a shorter outage window,
since we will not try to stop the services; we know they are already
down.
This commit is contained in:
Alex Vandiver 2021-04-20 18:15:25 +00:00 committed by Tim Abbott
parent 16650ba239
commit 6db454b252
1 changed files with 5 additions and 1 deletions

View File

@ -307,7 +307,11 @@ if migrations_needed:
subprocess.check_call(["./manage.py", "create_realm_internal_bots"], preexec_fn=su_to_zulip)
logging.info("Restarting Zulip...")
subprocess.check_output(["./scripts/restart-server", "--fill-cache"], preexec_fn=su_to_zulip)
if IS_SERVER_UP:
subprocess.check_output(["./scripts/restart-server", "--fill-cache"], preexec_fn=su_to_zulip)
else:
subprocess.check_output(["./scripts/start-server", "--fill-cache"], preexec_fn=su_to_zulip)
logging.info("Upgrade complete!")
if args.audit_fts_indexes: