summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Gomes <tiago.gomes@codethink.co.uk>2018-09-12 13:24:31 +0100
committerTiago Gomes <tiago.gomes@codethink.co.uk>2018-09-14 16:38:43 +0100
commit46cbd8896b24443aac1a616bbd62892ebe31a7c2 (patch)
tree510bd6e7556388abd559b954d1f45b115c462ff4
parent32fad24fc02208e700891ec9867d0fd66f3242e4 (diff)
downloadbuildstream-46cbd8896b24443aac1a616bbd62892ebe31a7c2.tar.gz
artifactcache: rename get_quota_exceeded()
-rw-r--r--buildstream/_artifactcache/artifactcache.py6
-rw-r--r--buildstream/_scheduler/queues/buildqueue.py2
-rw-r--r--buildstream/_scheduler/scheduler.py2
3 files changed, 5 insertions, 5 deletions
diff --git a/buildstream/_artifactcache/artifactcache.py b/buildstream/_artifactcache/artifactcache.py
index 45293e345..eb7759d83 100644
--- a/buildstream/_artifactcache/artifactcache.py
+++ b/buildstream/_artifactcache/artifactcache.py
@@ -267,7 +267,7 @@ class ArtifactCache():
"Please increase the cache-quota in {}."
.format(self.context.config_origin or default_conf))
- if self.get_quota_exceeded():
+ if self.has_quota_exceeded():
raise ArtifactError("Cache too full. Aborting.",
detail=detail,
reason="cache-too-full")
@@ -354,14 +354,14 @@ class ArtifactCache():
self._cache_size = cache_size
self._write_cache_size(self._cache_size)
- # get_quota_exceeded()
+ # has_quota_exceeded()
#
# Checks if the current artifact cache size exceeds the quota.
#
# Returns:
# (bool): True of the quota is exceeded
#
- def get_quota_exceeded(self):
+ def has_quota_exceeded(self):
return self.get_cache_size() > self._cache_quota
################################################
diff --git a/buildstream/_scheduler/queues/buildqueue.py b/buildstream/_scheduler/queues/buildqueue.py
index 6e7ce04aa..0c74b3698 100644
--- a/buildstream/_scheduler/queues/buildqueue.py
+++ b/buildstream/_scheduler/queues/buildqueue.py
@@ -101,7 +101,7 @@ class BuildQueue(Queue):
# If the estimated size outgrows the quota, ask the scheduler
# to queue a job to actually check the real cache size.
#
- if artifacts.get_quota_exceeded():
+ if artifacts.has_quota_exceeded():
self._scheduler.check_cache_size()
def done(self, job, element, result, success):
diff --git a/buildstream/_scheduler/scheduler.py b/buildstream/_scheduler/scheduler.py
index 635b0628c..de544bce7 100644
--- a/buildstream/_scheduler/scheduler.py
+++ b/buildstream/_scheduler/scheduler.py
@@ -351,7 +351,7 @@ class Scheduler():
platform = Platform.get_platform()
artifacts = platform.artifactcache
- if not artifacts.get_quota_exceeded():
+ if not artifacts.has_quota_exceeded():
return
job = CleanupJob(self, 'cleanup', 'cleanup/cleanup',