From 438d58b2aaf4c92df4af9d62569badac0360529b Mon Sep 17 00:00:00 2001 From: fynnbe Date: Wed, 5 Jun 2024 10:46:47 +0200 Subject: [PATCH] log cache info --- bioimageio_collection_backoffice/s3_client.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bioimageio_collection_backoffice/s3_client.py b/bioimageio_collection_backoffice/s3_client.py index 4483409d..0c444943 100644 --- a/bioimageio_collection_backoffice/s3_client.py +++ b/bioimageio_collection_backoffice/s3_client.py @@ -66,6 +66,10 @@ def __post_init__(self): self.load_file = self._cache(self.load_file) logger.debug("Created S3-Client: {}", self) + def __del__(self): + if self._cache is not None: + logger.info("cache info: {}", self._cache.cache_info) + def _bucket_exists(self, bucket: str) -> bool: return self._client.bucket_exists(bucket)