diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-09-09 18:48:29 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-09-10 16:53:57 +0900 |
commit | 742908ea79abf0a6ff00a522e12fa32ba4a0aa7c (patch) | |
tree | 5b9952bcf4228a9a841d966b8e5a6752955f637d | |
parent | 8b748f2d7da2bc58627194a6fc68cb418489aeb6 (diff) | |
download | buildstream-742908ea79abf0a6ff00a522e12fa32ba4a0aa7c.tar.gz |
_scheduler/jobs/cleanupjob.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/cleanupjob.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/buildstream/_scheduler/jobs/cleanupjob.py b/buildstream/_scheduler/jobs/cleanupjob.py index 199ae70f8..54d615952 100644 --- a/buildstream/_scheduler/jobs/cleanupjob.py +++ b/buildstream/_scheduler/jobs/cleanupjob.py @@ -24,13 +24,15 @@ class CleanupJob(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.clean() + return self._artifacts.clean() 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() |