diff options
Diffstat (limited to 'buildstream/_scheduler/queues/buildqueue.py')
-rw-r--r-- | buildstream/_scheduler/queues/buildqueue.py | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/buildstream/_scheduler/queues/buildqueue.py b/buildstream/_scheduler/queues/buildqueue.py index aa489f381..a5712f911 100644 --- a/buildstream/_scheduler/queues/buildqueue.py +++ b/buildstream/_scheduler/queues/buildqueue.py @@ -66,22 +66,30 @@ class BuildQueue(Queue): return super().enqueue(to_queue) + def push(self, element): + if element._cached_success(): + self.skip(element) + + assert element._buildable() + + super().push(element) + def process(self, element): return element._assemble() - def status(self, element): - if not element._is_required(): - # Artifact is not currently required but it may be requested later. - # Keep it in the queue. - return QueueStatus.WAIT + # def status(self, element): + # if not element._is_required(): + # # Artifact is not currently required but it may be requested later. + # # Keep it in the queue. + # return QueueStatus.WAIT - if element._cached_success(): - return QueueStatus.SKIP + # if element._cached_success(): + # return QueueStatus.SKIP - if not element._buildable(): - return QueueStatus.WAIT + # if not element._buildable(): + # return QueueStatus.WAIT - return QueueStatus.READY + # return QueueStatus.READY def _check_cache_size(self, job, element, artifact_size): |