Skip to content

Commit

Permalink
Merge branch 'staging' into v5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
18alantom committed Feb 1, 2024
2 parents 64871d6 + ac96cc0 commit ea593ed
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions bench/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,10 +370,13 @@ def get_cached(self) -> bool:

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}")
message = f"Cache extraction failed for {self.app_name}, skipping cache"
click.secho(message, fg="yellow")
logger.exception(message)
shutil.rmtree(app_path)
return False

Expand Down

0 comments on commit ea593ed

Please sign in to comment.