diff options
author | Tiago Gomes <tiago.gomes@codethink.co.uk> | 2018-09-12 13:24:31 +0100 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2018-09-30 08:34:21 +0200 |
commit | 9bca9183aba97f82c6158a0df2e3a8fc433ca75f (patch) | |
tree | 7f6a7febebcf61c0a38a2053b068b2925b8d3f16 | |
parent | e3ff069ec85df66cac20efb6b378b230ee0a930f (diff) | |
download | buildstream-9bca9183aba97f82c6158a0df2e3a8fc433ca75f.tar.gz |
artifactcache: rename get_quota_exceeded()
-rw-r--r-- | buildstream/_artifactcache/artifactcache.py | 6 | ||||
-rw-r--r-- | buildstream/_scheduler/queues/buildqueue.py | 2 | ||||
-rw-r--r-- | 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', |