summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2018-09-26 10:15:49 +0100
committerJürg Billeter <j@bitron.ch>2018-09-27 10:19:12 +0100
commit99e90918a4fe5dfac1fe0edbf0e9a3b82b0d8eba (patch)
treee14efefb51c77915c145f891b7a3448c80568078
parent28c62b005d2489e6721f8ff3d101da3266390257 (diff)
downloadbuildstream-99e90918a4fe5dfac1fe0edbf0e9a3b82b0d8eba.tar.gz
_artifactcache/casserver.py: Use Context for artifact cache creation
-rw-r--r--buildstream/_artifactcache/casserver.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/buildstream/_artifactcache/casserver.py b/buildstream/_artifactcache/casserver.py
index d833878d5..b51572755 100644
--- a/buildstream/_artifactcache/casserver.py
+++ b/buildstream/_artifactcache/casserver.py
@@ -35,8 +35,6 @@ from .._protos.buildstream.v2 import buildstream_pb2, buildstream_pb2_grpc
from .._exceptions import ArtifactError
from .._context import Context
-from .cascache import CASCache
-
# The default limit for gRPC messages is 4 MiB.
# Limit payload to 1 MiB to leave sufficient headroom for metadata.
@@ -60,7 +58,7 @@ def create_server(repo, *, enable_push):
context = Context()
context.artifactdir = os.path.abspath(repo)
- artifactcache = CASCache(context)
+ artifactcache = context.artifactcache
# Use max_workers default from Python 3.5+
max_workers = (os.cpu_count() or 1) * 5