summaryrefslogtreecommitdiff
path: root/buildstream/_scheduler/scheduler.py
diff options
context:
space:
mode:
Diffstat (limited to 'buildstream/_scheduler/scheduler.py')
-rw-r--r--buildstream/_scheduler/scheduler.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/buildstream/_scheduler/scheduler.py b/buildstream/_scheduler/scheduler.py
index 30e70a4fc..68c115c1b 100644
--- a/buildstream/_scheduler/scheduler.py
+++ b/buildstream/_scheduler/scheduler.py
@@ -29,7 +29,6 @@ from contextlib import contextmanager
# Local imports
from .resources import Resources, ResourceType
from .jobs import JobStatus, CacheSizeJob, CleanupJob
-from .._platform import Platform
# A decent return code for Scheduler.run()
@@ -286,6 +285,8 @@ class Scheduler():
# Callback for the cache size job
def _cache_size_job_complete(self, status, cache_size):
+ context = self.context
+ artifacts = context.artifactcache
# Deallocate cache size job resources
self._cache_size_running = None
@@ -295,9 +296,6 @@ class Scheduler():
if status != JobStatus.OK:
return
- platform = Platform.get_platform()
- artifacts = platform.artifactcache
-
if artifacts.has_quota_exceeded():
self._cleanup_scheduled = True