Skip to content
Snippets Groups Projects
Commit 99e90918 authored by Jürg Billeter's avatar Jürg Billeter
Browse files

_artifactcache/casserver.py: Use Context for artifact cache creation

parent 28c62b00
No related branches found
No related tags found
1 merge request!829Make platform independent of context
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment