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:07:13 +0900
commitfc79fb67e769f43a60d8eb8933f6ea1d8f521a0d (patch)
treeed2f85891e17c8c4a8a4752887b5475ab61f5800
parentde2b8603123fb91040d823759e3c0617ae14e28c (diff)
downloadbuildstream-fc79fb67e769f43a60d8eb8933f6ea1d8f521a0d.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