mirror of https://github.com/zulip/zulip.git
restart-server: Maintain a last symlink.
This commit is contained in:
parent
82ad32f058
commit
1158a86ae7
|
@ -31,7 +31,12 @@ logging.info("Stopping workers")
|
||||||
subprocess.check_call(["supervisorctl", "stop", "zulip-workers:*"])
|
subprocess.check_call(["supervisorctl", "stop", "zulip-workers:*"])
|
||||||
logging.info("Stopping server core")
|
logging.info("Stopping server core")
|
||||||
subprocess.check_call(["supervisorctl", "stop", "zulip-senders:* zulip-django zulip-tornado"])
|
subprocess.check_call(["supervisorctl", "stop", "zulip-senders:* zulip-django zulip-tornado"])
|
||||||
subprocess.check_call(["ln", '-nsf', deploy_path, os.path.join(DEPLOYMENTS_DIR, "current")])
|
|
||||||
|
current_symlink = os.path.join(DEPLOYMENTS_DIR, "current")
|
||||||
|
last_symlink = os.path.join(DEPLOYMENTS_DIR, "last")
|
||||||
|
if os.readlink(current_symlink) != deploy_path:
|
||||||
|
subprocess.check_call(["ln", '-nsf', os.readlink(current_symlink), last_symlink])
|
||||||
|
subprocess.check_call(["ln", '-nsf', deploy_path, current_symlink])
|
||||||
logging.info("Starting server core")
|
logging.info("Starting server core")
|
||||||
subprocess.check_call(["supervisorctl", "start", "zulip-tornado zulip-django zulip-senders:*"])
|
subprocess.check_call(["supervisorctl", "start", "zulip-tornado zulip-django zulip-senders:*"])
|
||||||
logging.info("Starting workers")
|
logging.info("Starting workers")
|
||||||
|
|
Loading…
Reference in New Issue