summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2018-06-12 17:17:40 +0100
committerknownexus <phillip.smyth@codethink.co.uk>2018-07-31 17:32:35 +0100
commit3fa79d8da42e3ab4abb93d9891cc96a4a509cebb (patch)
tree123c7c1774943315d4eb70486c5fe33e68424391
parent78944e9a69dc8abe69daecaf915dcb517284faad (diff)
downloadbuildstream-3fa79d8da42e3ab4abb93d9891cc96a4a509cebb.tar.gz
_scheduler/queues: Add failed builds to "done" queue
This allows the scheduler to move jobs from the current queue to the next. As a result of this change later queues than the build queue mustn't skip a cached failure, so the logic is specialised to build queues only.
-rw-r--r--buildstream/_scheduler/queues/buildqueue.py1
-rw-r--r--buildstream/_scheduler/queues/queue.py4
2 files changed, 4 insertions, 1 deletions
diff --git a/buildstream/_scheduler/queues/buildqueue.py b/buildstream/_scheduler/queues/buildqueue.py
index 272f19fd7..5967fbf76 100644
--- a/buildstream/_scheduler/queues/buildqueue.py
+++ b/buildstream/_scheduler/queues/buildqueue.py
@@ -60,6 +60,7 @@ class BuildQueue(Queue):
action_cb=self.process,
complete_cb=self._job_done,
max_retries=self._max_retries)
+ self._done_queue.append(job)
self.failed_elements.append(element)
self._scheduler._job_complete_callback(job, False)
diff --git a/buildstream/_scheduler/queues/queue.py b/buildstream/_scheduler/queues/queue.py
index 6c1583495..28da17711 100644
--- a/buildstream/_scheduler/queues/queue.py
+++ b/buildstream/_scheduler/queues/queue.py
@@ -296,6 +296,7 @@ class Queue():
# See the Job object for an explanation of the call signature
#
def _job_done(self, job, element, success, result):
+ element._update_state()
# Update values that need to be synchronized in the main task
# before calling any queue implementation
@@ -335,8 +336,9 @@ class Queue():
# No exception occured, handle the success/failure state in the normal way
#
+ self._done_queue.append(job)
+
if success:
- self._done_queue.append(job)
if processed:
self.processed_elements.append(element)
else: