zulip_tools.py: Extract may_be_perform_purging() function.

Based on the `dry_run` flag, this function either purges the list
of directories passed to them or prints a listing of the directories
it would have purged/kept_back, had the `dry_run` flag been false.
This commit is contained in:
Harshit Bansal
2017-08-30 21:58:00 +00:00
committed by Tim Abbott
parent 5662726a22
commit 20f062f726
4 changed files with 22 additions and 16 deletions

View File

@@ -61,7 +61,8 @@ def main():
args = parse_args()
caches_in_use = get_caches_in_use(args.threshold_days)
purge_unused_caches(
NODE_MODULES_CACHE_PATH, caches_in_use, args.threshold_days, args.dry_run, "node modules")
NODE_MODULES_CACHE_PATH, caches_in_use, args.threshold_days,
args.dry_run, "node modules cache")
if __name__ == "__main__":
main()