diff options
author | Jürg Billeter <j@bitron.ch> | 2019-06-19 14:48:05 +0200 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2019-06-25 09:08:17 +0000 |
commit | f7133ecadb0b01dc545d507ebae47997f5aaa401 (patch) | |
tree | fc60d22bfa32cb8ccf08703dc449f1274d335c58 | |
parent | 737aea1840253abddc3468743cedb4b706f734a5 (diff) | |
download | buildstream-f7133ecadb0b01dc545d507ebae47997f5aaa401.tar.gz |
_stream.py: Use scheduler to fetch subprojects
-rw-r--r-- | src/buildstream/_stream.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/buildstream/_stream.py b/src/buildstream/_stream.py index 650202d21..a7db33bb9 100644 --- a/src/buildstream/_stream.py +++ b/src/buildstream/_stream.py @@ -961,8 +961,14 @@ class Stream(): # junctions (list of Element): The junctions to fetch # def fetch_subprojects(self, junctions): - for junction in junctions: - junction._fetch() + old_queues = self.queues + try: + queue = FetchQueue(self._scheduler) + queue.enqueue(junctions) + self.queues = [queue] + self._run() + finally: + self.queues = old_queues ############################################################# # Scheduler API forwarding # |