diff options
author | Tiago Gomes <tiago.gomes@codethink.co.uk> | 2018-08-13 17:00:04 +0100 |
---|---|---|
committer | Tiago Gomes <tiago.gomes@codethink.co.uk> | 2018-09-14 17:47:19 +0100 |
commit | 23b54e60fd3189ef9f6125aa3cd8b56ef750e926 (patch) | |
tree | 48bc537afa9971846d57d5c960aded29bf9bdfdf | |
parent | e2af2d519c9c6f3f87019f3c1f76a6995945d2e9 (diff) | |
download | buildstream-tiagogomes/issue-573.tar.gz |
artifactcache: add some logging to cleanup operationtiagogomes/issue-573
-rw-r--r-- | buildstream/_artifactcache/artifactcache.py | 8 | ||||
-rw-r--r-- | buildstream/_scheduler/scheduler.py | 3 |
2 files changed, 10 insertions, 1 deletions
diff --git a/buildstream/_artifactcache/artifactcache.py b/buildstream/_artifactcache/artifactcache.py index f1cd117f2..09b714925 100644 --- a/buildstream/_artifactcache/artifactcache.py +++ b/buildstream/_artifactcache/artifactcache.py @@ -281,6 +281,14 @@ class ArtifactCache(): # Remove the actual artifact, if it's not required. size = self.remove(to_remove) self._cache_size -= size + self._message(MessageType.DEBUG, + "Removed artifact {} ({})".format( + to_remove[:-(len(key) - self.context.log_key_length)], + utils._pretty_size(size))) + + self._message(MessageType.INFO, + "New artifact cache size: {}".format( + utils._pretty_size(self._cache_size))) return old_cache_size - self._cache_size diff --git a/buildstream/_scheduler/scheduler.py b/buildstream/_scheduler/scheduler.py index cb820c943..f66777d64 100644 --- a/buildstream/_scheduler/scheduler.py +++ b/buildstream/_scheduler/scheduler.py @@ -250,7 +250,8 @@ class Scheduler(): artifacts = Platform.get_platform().artifactcache if artifacts.has_quota_exceeded(): - job = CleanupJob(self, 'cleanup', 'cleanup/cleanup', + job = CleanupJob(self, 'Clean artifact cache', + 'cleanup/cleanup', resources=[ResourceType.CACHE, ResourceType.PROCESS], exclusive_resources=[ResourceType.CACHE]) |