summaryrefslogtreecommitdiff
path: root/buildstream/_scheduler/fetchqueue.py
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2018-01-15 08:52:27 +0100
committerTristan Van Berkom <tristan.van.berkom@gmail.com>2018-01-16 12:58:39 +0000
commit03412a9e8a13e6c5f50dec95e067c2ae6900d08f (patch)
tree2dc7091abd056c761e39c8dc20a294af177c4505 /buildstream/_scheduler/fetchqueue.py
parentd6ebd6cea97e76e79c2437d4ae93944a983e5727 (diff)
downloadbuildstream-juerg/source-state.tar.gz
Use explicit source state updatesjuerg/source-state
This adds the _update_state() method to the Source class, similar to the corresponding method in the Element class.
Diffstat (limited to 'buildstream/_scheduler/fetchqueue.py')
-rw-r--r--buildstream/_scheduler/fetchqueue.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/buildstream/_scheduler/fetchqueue.py b/buildstream/_scheduler/fetchqueue.py
index 8fc19d283..b284d5b35 100644
--- a/buildstream/_scheduler/fetchqueue.py
+++ b/buildstream/_scheduler/fetchqueue.py
@@ -57,9 +57,9 @@ class FetchQueue(Queue):
if returncode != 0:
return False
- for source in element.sources():
+ element._update_state()
- # Successful fetch, we must be CACHED now
- source._bump_consistency(Consistency.CACHED)
+ # Successful fetch, we must be CACHED now
+ assert(element._consistency() == Consistency.CACHED)
return True