mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
purge-old-deployments: Use the clean_unused_caches.main function.
We currently run the `clean_unused_caches.py` as a script to clean the unused caches. This commit replaces that with `clean_unused_caches.main` function as it would be faster.
This commit is contained in:
@@ -7,6 +7,7 @@ from typing import Set
|
||||
|
||||
ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
sys.path.append(ZULIP_PATH)
|
||||
from scripts.lib import clean_unused_caches
|
||||
from scripts.lib.zulip_tools import (
|
||||
DEPLOYMENTS_DIR,
|
||||
get_recent_deployments,
|
||||
@@ -86,9 +87,7 @@ def main() -> None:
|
||||
print("Cleaning orphaned/unused caches...")
|
||||
|
||||
# Call 'clean_unused_caches.py' script to clean any orphaned/unused caches.
|
||||
subprocess.check_call(
|
||||
[os.path.join(ZULIP_PATH, "scripts/lib/clean_unused_caches.py"), *sys.argv[1:]]
|
||||
)
|
||||
clean_unused_caches.main(args)
|
||||
print("Done!")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user