2
0
mirror of https://github.com/frappe/bench.git synced 2024-06-15 14:42:22 +00:00

fix: increase tar file limit

including node_modules in tar blob causes
file counts to be consistently above 10k
eg:
- gameplan: 25,269
- hrms: 32,369
This commit is contained in:
18alantom 2024-02-01 14:57:17 +05:30
parent 436b3c5642
commit d8ce1b3cb4

View File

@ -370,8 +370,9 @@ class App(AppMeta):
click.secho(f"Getting {self.app_name} from cache", fg="yellow")
with tarfile.open(cache_path, mode) as tar:
extraction_filter = get_app_cache_extract_filter(count_threshold=150_000)
try:
tar.extractall(app_path.parent, filter=get_app_cache_extract_filter())
tar.extractall(app_path.parent, filter=extraction_filter)
except Exception:
logger.exception(f"Cache extraction failed for {self.app_name}")
shutil.rmtree(app_path)