summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2018-09-09 18:46:29 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2018-09-10 15:56:12 +0900
commit222c5034cf9ddd213475c51413306a334e133424 (patch)
tree6f2580f7dc263a65bd062bd0be70474e732cb9f3
parentaf0bfaeeda28186df3accebb688f208cf6036a29 (diff)
downloadbuildstream-222c5034cf9ddd213475c51413306a334e133424.tar.gz
_scheduler/jobs/cachesizejob.py: Use Platform.get_platform() public accessor
This was previously poking directly at the Platform._instance. Also, use the name 'artifacts' to hold the artifact cache to be consistent with other parts of the codebase, instead of calling it 'cache'.
-rw-r--r--buildstream/_scheduler/jobs/cachesizejob.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/buildstream/_scheduler/jobs/cachesizejob.py b/buildstream/_scheduler/jobs/cachesizejob.py
index be682e3de..9c1a4bc97 100644
--- a/buildstream/_scheduler/jobs/cachesizejob.py
+++ b/buildstream/_scheduler/jobs/cachesizejob.py
@@ -24,13 +24,15 @@ class CacheSizeJob(Job):
def __init__(self, *args, complete_cb, **kwargs):
super().__init__(*args, **kwargs)
self._complete_cb = complete_cb
- self._cache = Platform._instance.artifactcache
+
+ platform = Platform.get_platform()
+ self._artifacts = platform.artifactcache
def child_process(self):
- return self._cache.compute_cache_size()
+ return self._artifacts.compute_cache_size()
def parent_complete(self, success, result):
- self._cache.set_cache_size(result)
+ self._artifacts.set_cache_size(result)
if self._complete_cb:
self._complete_cb(result)