mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
scripts: Rearrange the arguments of purge_unused_caches().
This commit re-arranges the arguments of `purge_unused_caches()` function in order to remain consistent with other similar functions in the library like `may_be_perform_caching()`.
This commit is contained in:
committed by
Tim Abbott
parent
df7ea375c1
commit
57161a92a1
@@ -231,8 +231,8 @@ def get_caches_to_be_purged(caches_dir, caches_in_use, threshold_days):
|
||||
caches_to_purge.add(cache_dir)
|
||||
return caches_to_purge
|
||||
|
||||
def purge_unused_caches(caches_dir, caches_in_use, args, cache_type):
|
||||
# type: (Text, Set[Text], argparse.Namespace, Text) -> None
|
||||
def purge_unused_caches(caches_dir, caches_in_use, cache_type, args):
|
||||
# type: (Text, Set[Text], Text, argparse.Namespace) -> None
|
||||
all_caches = set([os.path.join(caches_dir, cache) for cache in os.listdir(caches_dir)])
|
||||
caches_to_purge = get_caches_to_be_purged(caches_dir, caches_in_use, args.threshold_days)
|
||||
caches_to_keep = all_caches - caches_to_purge
|
||||
|
||||
Reference in New Issue
Block a user