Tim Abbott
a1408a9d3a
mypy: Remove unnecessary use of typing.Text.
2018-02-20 10:57:59 -08:00
Aditya Bansal
b0c0648a4f
clean-venv-cache: Handle cleaning up zulip-thumbor-venv properly.
2018-02-20 10:57:32 -08:00
Harshit Bansal
48662a79a5
clean-venv-cache: Fix an exception with unusual deployment dirs.
2017-10-31 00:01:09 -07:00
Harshit Bansal
57161a92a1
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()`.
2017-09-24 04:37:31 -07:00
Harshit Bansal
7f752f0942
scripts: Use `parse_cache_script_args()` in various cache cleaning scripts.
...
Instead of using `GENERIC_CACHE_SCRIPT_PARSER` and defining `parse_args()`
function in each script separately, use `parse_cache_script_args()`.
2017-09-24 04:37:31 -07:00
Harshit Bansal
4e6b68d02f
zulip_tools: Change `purge_unused_caches()` API.
...
Instead of accepting individual arguments, accept `argparse.Namespace`
object as an argument.
2017-09-24 04:37:31 -07:00
Harshit Bansal
20f062f726
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.
2017-09-16 08:28:57 -07:00
Tim Abbott
e38ac00f3c
caches: Move cache cleaning helper tools under scripts/lib.
...
This helps keep the root of scripts/ uncluttered.
2017-08-27 17:59:49 -07:00