diff options
-rw-r--r-- | buildstream/_artifactcache/artifactcache.py | 10 | ||||
-rw-r--r-- | buildstream/_scheduler/scheduler.py | 2 |
2 files changed, 9 insertions, 3 deletions
diff --git a/buildstream/_artifactcache/artifactcache.py b/buildstream/_artifactcache/artifactcache.py index 22965feca..61024fa6e 100644 --- a/buildstream/_artifactcache/artifactcache.py +++ b/buildstream/_artifactcache/artifactcache.py @@ -251,8 +251,14 @@ class ArtifactCache(): key = to_remove.rpartition('/')[2] if key not in self.required_artifacts: size = self.remove(to_remove) - if size: - self.cache_size -= size + self.cache_size -= size + self._message(MessageType.INFO, + "Removed artifact {} ({})".format( + key[:7], 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 fcde38a80..ffbdf8bd5 100644 --- a/buildstream/_scheduler/scheduler.py +++ b/buildstream/_scheduler/scheduler.py @@ -316,7 +316,7 @@ class Scheduler(): self._sched() def _run_cache_cleanup(self): - job = CleanupJob(self, 'cleanup', 'cleanup', + job = CleanupJob(self, 'Cleaning artifact cache', 'cleanup', resources=[ResourceType.CACHE, ResourceType.PROCESS], exclusive_resources=[ResourceType.CACHE]) |