summaryrefslogtreecommitdiff
path: root/src/buildstream/_artifact.py
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2019-11-19 21:06:36 +0100
committerJürg Billeter <j@bitron.ch>2020-01-16 20:24:28 +0100
commit87445b36c99a8743877f493fcd9efba679e3e6c5 (patch)
treee629ca7733e3b9f0857231e47f15efaa1549ce0b /src/buildstream/_artifact.py
parenta5b2396539e1621eef75a035b12c1c4266b5c9fe (diff)
downloadbuildstream-juerg/assemble_done.tar.gz
element.py: Optimize assemble_done()juerg/assemble_done
After a successful build we know that the artifact is cached. Avoid querying buildbox-casd and the filesystem.
Diffstat (limited to 'src/buildstream/_artifact.py')
-rw-r--r--src/buildstream/_artifact.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/buildstream/_artifact.py b/src/buildstream/_artifact.py
index feba3898b..ae1b395b3 100644
--- a/src/buildstream/_artifact.py
+++ b/src/buildstream/_artifact.py
@@ -459,6 +459,14 @@ class Artifact:
def reset_cached(self):
self._cached = None
+ # set_cached()
+ #
+ # Mark the artifact as cached without querying the filesystem.
+ # This is used as optimization when we know the artifact is available.
+ #
+ def set_cached(self):
+ self._cached = True
+
# _get_proto()
#
# Returns: