File tree Expand file tree Collapse file tree
snakemake_interface_software_deployment_plugins Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -349,12 +349,18 @@ class CacheableEnvBase(EnvBase, ABC):
349349 async def get_cache_assets (self ) -> Iterable [str ]: ...
350350
351351 @abstractmethod
352- async def cache_assets (self ) -> None :
353- """Determine environment assets and store any associated information or data to
354- self.cache_path.
352+ async def cache_asset (self , asset : str ) -> None :
353+ """Retrieve/create and store given asset to self.cache_path.
355354 """
356355 ...
357356
357+ async def managed_cache_assets (self ) -> None :
358+ try :
359+ for asset in await self .get_cache_assets ():
360+ await self .cache_asset (asset )
361+ except Exception as e :
362+ raise WorkflowError (f"Caching of { self .spec } failed: { e } " ) from e
363+
358364 @property
359365 def cache_path (self ) -> Path :
360366 return self ._cache_prefix
You can’t perform that action at this time.
0 commit comments