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.

purge-old-deployments: Use the `clean_unused_caches.main` function.

Riken Shahc5580607a7d8
diff --git a/scripts/purge-old-deployments b/scripts/purge-old-deployments
index c6c24772256..63e1bb3988e 100755
--- a/scripts/purge-old-deployments
+++ b/scripts/purge-old-deployments
@@ -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!")