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 15:56:12 +0900 |
commit | 67fa96e1489790f0f92ba7660644bb0a72297a37 (patch) | |
tree | 02e8bb249accde8e6471ec12dc2ebfc0eac3387d /buildstream | |
parent | 222c5034cf9ddd213475c51413306a334e133424 (diff) | |
download | buildstream-67fa96e1489790f0f92ba7660644bb0a72297a37.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'.
Diffstat (limited to 'buildstream')
-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() |