mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
scripts: Fix incorrect garbage-collection of emoji/node caches.
Apparently, we were incorrectly expressing the paths in the caches_in_use data structures for these two cache-cleaning algorithms, resulting in the default threshhold_days algorithm controlling which caches could be garbage-collected. While the emoji one was just a performance optimization for upgrade-zulip-from-git, it was possible for the main `node_modules` cache in use in production to be GCed, resulting in LaTeX rendering being broken.
This commit is contained in:
@@ -45,7 +45,8 @@ def get_caches_in_use(threshold_days):
|
||||
# If 'package.json' file doesn't exist then no node_modules
|
||||
# cache is associated with this setup.
|
||||
continue
|
||||
caches_in_use.add(os.readlink(node_modules_link_path))
|
||||
# The actual cache path doesn't include the /node_modules
|
||||
caches_in_use.add(os.path.dirname(os.readlink(node_modules_link_path)))
|
||||
|
||||
return caches_in_use
|
||||
|
||||
|
||||
Reference in New Issue
Block a user