Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

upgrade: Copy cache prefix with --skip-tornado.

Alex Vandiveref7c2ea0eab7
diff --git a/scripts/lib/upgrade-zulip-stage-2 b/scripts/lib/upgrade-zulip-stage-2
index 249cd99a526..ac872685307 100755
--- a/scripts/lib/upgrade-zulip-stage-2
+++ b/scripts/lib/upgrade-zulip-stage-2
@@ -10,6 +10,7 @@ import hashlib
import logging
import os
import re
+import shutil
import subprocess
import sys
import time
@@ -268,8 +269,6 @@ if os.path.exists(emoji_path):
emoji_data = f.read()
emoji_sha = hashlib.sha1(emoji_data).hexdigest()
if emoji_sha == "47033121dc20b376e0f86f4916969872ad22a293":
- import shutil
-
shutil.rmtree("/home/zulip/prod-static/generated/emoji/images-google-64")
# And then, building/installing the static assets.
@@ -341,6 +340,11 @@ elif not args.skip_migrations:
if line_str.startswith("[ ]"):
migrations_needed = True
+# If we're skipping tornado restarts, we need to ensure we keep the
+# same cache prefix as we currently have.
+if args.skip_tornado:
+ shutil.copyfile("../current/var/remote_cache_prefix", "./var/remote_cache_prefix")
+
# If there are no migrations needed, we can fill the caches now,
# instead of after they run.
if not migrations_needed: