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:
Harshit Bansal
2017-09-23 19:21:55 +00:00
committed by Tim Abbott
parent df7ea375c1
commit 57161a92a1
4 changed files with 5 additions and 5 deletions

View File

@@ -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