diff options
author | James Ennis <james.ennis@codethink.co.uk> | 2019-03-05 15:55:39 +0000 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2019-03-13 17:04:04 +0000 |
commit | da9994a479d8d4a7df4167655af29879cf811f18 (patch) | |
tree | 91398b095da08cd3d38ae72f2b9ad73b2755c95f | |
parent | e4aace8d300a75aaebf9f7c2b87e53fab20478b3 (diff) | |
download | buildstream-da9994a479d8d4a7df4167655af29879cf811f18.tar.gz |
_artifactcache.py: Add optional defer_prune flag to remove()
-rw-r--r-- | buildstream/_artifactcache.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/buildstream/_artifactcache.py b/buildstream/_artifactcache.py index 330365025..81b0e70a6 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(): # |