diff options
author | Jürg Billeter <j@bitron.ch> | 2017-07-07 12:25:18 +0200 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2017-07-14 14:13:51 +0200 |
commit | 47ad67d7d981e05ac380386b164395f67043b48f (patch) | |
tree | 39b57cb66bafebbe8bc7b6cafa50d8cce7ea3cc7 | |
parent | e934f1650e03960284408bc6f620dd692a2042a1 (diff) | |
download | buildstream-47ad67d7d981e05ac380386b164395f67043b48f.tar.gz |
element.py: Remove _set_cached()
Use _cached(recalculate=True) instead to reduce the number of code paths
touching __cached.
-rw-r--r-- | buildstream/_scheduler/buildqueue.py | 2 | ||||
-rw-r--r-- | buildstream/element.py | 10 |
2 files changed, 1 insertions, 11 deletions
diff --git a/buildstream/_scheduler/buildqueue.py b/buildstream/_scheduler/buildqueue.py index 7da4bfedc..439f6699b 100644 --- a/buildstream/_scheduler/buildqueue.py +++ b/buildstream/_scheduler/buildqueue.py @@ -43,7 +43,7 @@ class BuildQueue(Queue): def done(self, element, result, returncode): # Elements are cached after they are successfully assembled if returncode == 0: - element._set_cached() + element._cached(recalculate=True) element._set_built() return True diff --git a/buildstream/element.py b/buildstream/element.py index b864d8f8c..1ef622bbb 100644 --- a/buildstream/element.py +++ b/buildstream/element.py @@ -698,16 +698,6 @@ class Element(Plugin): raise ElementError("{}: Missing artifact {}" .format(self, self._get_display_key())) - # _set_cached(): - # - # Forcefully set the cached state on the element. - # - # This is done by the Pipeline when an element successfully - # completes a build. - # - def _set_cached(self): - self.__cached = True - # _set_built(): # # Forcefully set the built state on the element. |