diff options
author | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2018-12-05 07:37:54 +0000 |
---|---|---|
committer | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2018-12-05 07:37:54 +0000 |
commit | 5d77b871a343c8a196569ab17fd5e4f04bb6baec (patch) | |
tree | 8c2de9896dcc66d5e426cee9385956134d2e79b7 | |
parent | f75810265aa8cc898ef570fd3129ae31b1e326a8 (diff) | |
parent | 98c1546357b4913024ec9a0a63b69053ae8e920c (diff) | |
download | buildstream-5d77b871a343c8a196569ab17fd5e4f04bb6baec.tar.gz |
Merge branch 'tristan/refactor-queues-update-state' into 'master'
_scheduler/queues/queue.py: Don't call update state outside of error handling harness
See merge request BuildStream/buildstream!988
-rw-r--r-- | buildstream/_scheduler/queues/buildqueue.py | 16 | ||||
-rw-r--r-- | buildstream/_scheduler/queues/queue.py | 1 |
2 files changed, 11 insertions, 6 deletions
diff --git a/buildstream/_scheduler/queues/buildqueue.py b/buildstream/_scheduler/queues/buildqueue.py index 984a5457a..d05327557 100644 --- a/buildstream/_scheduler/queues/buildqueue.py +++ b/buildstream/_scheduler/queues/buildqueue.py @@ -106,10 +106,16 @@ class BuildQueue(Queue): def done(self, job, element, result, success): - if success: - # Inform element in main process that assembly is done - element._assemble_done() + # Inform element in main process that assembly is done + element._assemble_done() - # This has to be done after _assemble_done, such that the - # element may register its cache key as required + # This has to be done after _assemble_done, such that the + # element may register its cache key as required + # + # FIXME: Element._assemble() does not report both the failure state and the + # size of the newly cached failed artifact, so we can only adjust the + # artifact cache size for a successful build even though we know a + # failed build also grows the artifact cache size. + # + if success: self._check_cache_size(job, element, result) diff --git a/buildstream/_scheduler/queues/queue.py b/buildstream/_scheduler/queues/queue.py index 909cebb44..055e2f84b 100644 --- a/buildstream/_scheduler/queues/queue.py +++ b/buildstream/_scheduler/queues/queue.py @@ -292,7 +292,6 @@ 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 |