This is an automated email from the ASF dual-hosted git repository. tvb pushed a commit to branch jennis/introduce_artifact_delete in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit 2d46569fd4948e65eb461cd43e8c8fdf090756ee Author: James Ennis <[email protected]> AuthorDate: Tue Mar 5 15:55:39 2019 +0000 _artifactcache.py: Add optional defer_prune flag to remove() --- buildstream/_artifactcache.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/buildstream/_artifactcache.py b/buildstream/_artifactcache.py index 3303650..81b0e70 100644 --- a/buildstream/_artifactcache.py +++ b/buildstream/_artifactcache.py @@ -415,12 +415,14 @@ class ArtifactCache(): # Args: # ref (artifact_name): The name of the artifact to remove (as # generated by `Element.get_artifact_name`) + # defer_prune (bool): Optionally declare whether pruning should + # occur immediately after the ref is removed. # # Returns: # (int): The amount of space recovered in the cache, in bytes # - def remove(self, ref): - return self.cas.remove(ref) + def remove(self, ref, *, defer_prune=False): + return self.cas.remove(ref, defer_prune=defer_prune) # get_artifact_directory(): #
