Commit 470305a7 authored by Tristan Van Berkom's avatar Tristan Van Berkom
Browse files

_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
parent 7b32e1ec
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -32,7 +32,7 @@ class BuildQueue(Queue):


    action_name = "Build"
    action_name = "Build"
    complete_name = "Built"
    complete_name = "Built"
    resources = [ResourceType.PROCESS]
    resources = [ResourceType.PROCESS, ResourceType.CACHE]


    def __init__(self, *args, **kwargs):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        super().__init__(*args, **kwargs)
+1 −1
Original line number Original line Diff line number Diff line
@@ -29,7 +29,7 @@ class PullQueue(Queue):


    action_name = "Pull"
    action_name = "Pull"
    complete_name = "Pulled"
    complete_name = "Pulled"
    resources = [ResourceType.DOWNLOAD]
    resources = [ResourceType.DOWNLOAD, ResourceType.CACHE]


    def process(self, element):
    def process(self, element):
        # returns whether an artifact was downloaded or not
        # returns whether an artifact was downloaded or not