Commit 3fa79d8d authored by richardmaw-codethink's avatar richardmaw-codethink Committed by knownexus
Browse files

_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.
parent 78944e9a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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)

+3 −1
Original line number Diff line number Diff line
@@ -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
            #
            if success:
            self._done_queue.append(job)

            if success:
                if processed:
                    self.processed_elements.append(element)
                else: