mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
restart-server: Skip weekly restart-server if a deploy is in process.
This is unlikely, but cron running `restart-server` at the random wrong time mid-deploy could be bad.
This commit is contained in:
committed by
Tim Abbott
parent
a5a5791794
commit
6d80d4c77f
@@ -17,6 +17,7 @@ from scripts.lib.supervisor import list_supervisor_processes
|
||||
from scripts.lib.zulip_tools import (
|
||||
DEPLOYMENTS_DIR,
|
||||
ENDC,
|
||||
LOCK_DIR,
|
||||
OKGREEN,
|
||||
WARNING,
|
||||
get_config,
|
||||
@@ -51,6 +52,10 @@ elif username != "zulip":
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
if os.environ.get("RUNNING_UNDER_CRON") and os.path.exists(LOCK_DIR):
|
||||
logging.info("Skipping cron-triggered restart during deploy.")
|
||||
sys.exit(1)
|
||||
|
||||
if not args.skip_checks:
|
||||
logging.info("Running syntax and database checks")
|
||||
subprocess.check_call(["./manage.py", "check", "--database", "default"])
|
||||
|
Reference in New Issue
Block a user