From 9bca9183aba97f82c6158a0df2e3a8fc433ca75f Mon Sep 17 00:00:00 2001 From: Tiago Gomes Date: Wed, 12 Sep 2018 13:24:31 +0100 Subject: artifactcache: rename get_quota_exceeded() --- buildstream/_artifactcache/artifactcache.py | 6 +++--- buildstream/_scheduler/queues/buildqueue.py | 2 +- buildstream/_scheduler/scheduler.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/buildstream/_artifactcache/artifactcache.py b/buildstream/_artifactcache/artifactcache.py index b0cb4f353..9b5df1d26 100644 --- a/buildstream/_artifactcache/artifactcache.py +++ b/buildstream/_artifactcache/artifactcache.py @@ -277,7 +277,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") @@ -364,14 +364,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 90e3ad792..e63475f05 100644 --- a/buildstream/_scheduler/queues/buildqueue.py +++ b/buildstream/_scheduler/queues/buildqueue.py @@ -65,7 +65,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 8ab79c5f5..09af63de5 100644 --- a/buildstream/_scheduler/scheduler.py +++ b/buildstream/_scheduler/scheduler.py @@ -349,7 +349,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', -- cgit v1.2.1