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 16:53:56 +0900
commite5847077e6493e86ec5de09b2efa1f74a6f2d099 (patch)
tree971f0581e6407477bd6131c856de62bbb93c6206
parent2174db010d61d1a3af7bfbab97afcdc4b8b49858 (diff)
downloadbuildstream-e5847077e6493e86ec5de09b2efa1f74a6f2d099.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 2009fce97..54eb09c0d 100644
--- a/buildstream/_scheduler/queues/buildqueue.py
+++ b/buildstream/_scheduler/queues/buildqueue.py
@@ -32,7 +32,7 @@ class BuildQueue(Queue):
action_name = "Build"
complete_name = "Built"
- resources = [ResourceType.PROCESS]
+ resources = [ResourceType.PROCESS, ResourceType.CACHE]
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
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