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, 4 insertions, 2 deletions
diff --git a/buildstream/_scheduler/scheduler.py b/buildstream/_scheduler/scheduler.py
index 0cd13b42f..635b0628c 100644
--- a/buildstream/_scheduler/scheduler.py
+++ b/buildstream/_scheduler/scheduler.py
@@ -341,7 +341,7 @@ class Scheduler():
# exceeds the cache quota.
#
# Args:
- # cache_size (int): The calculated cache size
+ # cache_size (int): The calculated cache size (ignored)
#
# NOTE: This runs in response to completion of the cache size
# calculation job lauched by Scheduler.check_cache_size(),
@@ -349,7 +349,9 @@ class Scheduler():
#
def _run_cleanup(self, cache_size):
platform = Platform.get_platform()
- if cache_size and cache_size < platform.artifactcache.cache_quota:
+ artifacts = platform.artifactcache
+
+ if not artifacts.get_quota_exceeded():
return
job = CleanupJob(self, 'cleanup', 'cleanup/cleanup',