summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2018-09-03 20:53:35 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2018-09-10 15:56:11 +0900
commitf81637c5e49a25ab5d096e46494d639fcccc68e8 (patch)
treeba136afc27f3b527ee3ae3a1854b93c954717c32
parent80e912e6ab3d457f1fcbcfb8f9bb47eb0f3399c2 (diff)
downloadbuildstream-f81637c5e49a25ab5d096e46494d639fcccc68e8.tar.gz
_scheduler/queues: Mark build and pull queue as requiring shared access to the CACHE
This is what the whole resource.py thing was created for, the cleanup job must have exclusive access to the cache, while the pull and build jobs which result in adding new artifacts, must only require shared access. This is a part of #623
-rw-r--r--buildstream/_scheduler/queues/buildqueue.py2
-rw-r--r--buildstream/_scheduler/queues/pullqueue.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/buildstream/_scheduler/queues/buildqueue.py b/buildstream/_scheduler/queues/buildqueue.py
index 1f2caa9a7..6fbd392c7 100644
--- a/buildstream/_scheduler/queues/buildqueue.py
+++ b/buildstream/_scheduler/queues/buildqueue.py
@@ -28,7 +28,7 @@ class BuildQueue(Queue):
action_name = "Build"
complete_name = "Built"
- resources = [ResourceType.PROCESS]
+ resources = [ResourceType.PROCESS, ResourceType.CACHE]
def process(self, element):
element._assemble()
diff --git a/buildstream/_scheduler/queues/pullqueue.py b/buildstream/_scheduler/queues/pullqueue.py
index 5d732fcf8..2097d95af 100644
--- a/buildstream/_scheduler/queues/pullqueue.py
+++ b/buildstream/_scheduler/queues/pullqueue.py
@@ -29,7 +29,7 @@ class PullQueue(Queue):
action_name = "Pull"
complete_name = "Pulled"
- resources = [ResourceType.DOWNLOAD]
+ resources = [ResourceType.DOWNLOAD, ResourceType.CACHE]
def process(self, element):
# returns whether an artifact was downloaded or not