diff options
author | James Ennis <james.ennis@codethink.co.uk> | 2019-08-30 15:26:23 +0100 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2019-09-04 12:05:49 +0000 |
commit | 6b3da9429b18d93e2f1348b5758536e981e3bec2 (patch) | |
tree | 675e4167d883344af3f1ffe3fb1401385664f938 /src/buildstream/_loader | |
parent | 566a6a55d5d3c73809d6e43d819fa36702f0c231 (diff) | |
download | buildstream-6b3da9429b18d93e2f1348b5758536e981e3bec2.tar.gz |
_loader.py: Cache how many Elements we load
Diffstat (limited to 'src/buildstream/_loader')
-rw-r--r-- | src/buildstream/_loader/loader.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/buildstream/_loader/loader.py b/src/buildstream/_loader/loader.py index 89458d40c..b2dc7c1c3 100644 --- a/src/buildstream/_loader/loader.py +++ b/src/buildstream/_loader/loader.py @@ -62,6 +62,7 @@ class Loader(): # Public members # self.project = project # The associated Project + self.loaded = None # The number of loaded Elements # # Private members @@ -146,6 +147,11 @@ class Loader(): self._clean_caches() + # Cache how many Elements have just been loaded + if task: + # Workaround for task potentially being None (because no State object) + self.loaded = task.current_progress + return ret # get_state_for_child_job_pickling(self) |