diff options
author | Jonathan Maw <jonathan.maw@codethink.co.uk> | 2018-08-16 18:18:21 +0100 |
---|---|---|
committer | Jonathan Maw <jonathan.maw@codethink.co.uk> | 2018-08-20 13:36:02 +0100 |
commit | d9507a9e55f1f9350305ed549947bb2400d5680b (patch) | |
tree | 7c7b8c457b5b8c5256135036bba52dd0d927f1c8 /buildstream/_artifactcache/cascache.py | |
parent | 1f88a1e9a3d0b9340b8b7180fb1ea27ddb94084d (diff) | |
download | buildstream-d9507a9e55f1f9350305ed549947bb2400d5680b.tar.gz |
Fix get_cache_size to store it in the ArtifactCache, not the context
Diffstat (limited to 'buildstream/_artifactcache/cascache.py')
-rw-r--r-- | buildstream/_artifactcache/cascache.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/buildstream/_artifactcache/cascache.py b/buildstream/_artifactcache/cascache.py index 074899d81..d616e293a 100644 --- a/buildstream/_artifactcache/cascache.py +++ b/buildstream/_artifactcache/cascache.py @@ -61,6 +61,8 @@ class CASCache(ArtifactCache): os.makedirs(os.path.join(self.casdir, 'refs', 'heads'), exist_ok=True) os.makedirs(os.path.join(self.casdir, 'objects'), exist_ok=True) + self._calculate_cache_quota() + self._enable_push = enable_push # Per-project list of _CASRemote instances. @@ -330,7 +332,7 @@ class CASCache(ArtifactCache): request.write_offset = offset # max. 64 kB chunks request.data = f.read(chunk_size) - request.resource_name = resource_name + request.resource_name = resource_name # pylint: disable=cell-var-from-loop request.finish_write = remaining <= 0 yield request offset += chunk_size |