summaryrefslogtreecommitdiff
path: root/src/buildstream/_frontend
diff options
context:
space:
mode:
authorTom Pollard <tom.pollard@codethink.co.uk>2019-12-04 13:49:47 +0000
committerTom Pollard <tom.pollard@codethink.co.uk>2020-01-15 11:02:09 +0000
commit16cbb7cb91a5b59e9c9907b64b2e02d7027ea5c0 (patch)
tree60284269b2c94937e2b0e03366aac8bb0814ec03 /src/buildstream/_frontend
parent5a7c4c4f6e205e0eb702f18af77907e7239639da (diff)
downloadbuildstream-16cbb7cb91a5b59e9c9907b64b2e02d7027ea5c0.tar.gz
userconfig.yaml: Add bool for disabling console output throttlingtpollard/messagerate
Also highlight the change & configuration in NEWS
Diffstat (limited to 'src/buildstream/_frontend')
-rw-r--r--src/buildstream/_frontend/app.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/buildstream/_frontend/app.py b/src/buildstream/_frontend/app.py
index b7aeb040b..cd05b7f8d 100644
--- a/src/buildstream/_frontend/app.py
+++ b/src/buildstream/_frontend/app.py
@@ -91,6 +91,7 @@ class App:
# Cached messages
self._message_text = ""
+ self._cache_messages = None
#
# Early initialization
@@ -239,6 +240,9 @@ class App:
# Propagate pipeline feedback to the user
self.context.messenger.set_message_handler(self._message_handler)
+ # Check if throttling frontend updates to tick rate
+ self._cache_messages = self.context.log_throttle_updates
+
# Allow the Messenger to write status messages
self.context.messenger.set_render_status_cb(self._render)
@@ -803,8 +807,8 @@ class App:
text = self.logger.render(message)
self._message_text += text
- # If scheduler tick isn't active then render
- if not self.stream.running:
+ # If we're not rate limiting messaging, or the scheduler tick isn't active then render
+ if not self._cache_messages or not self.stream.running:
self._render(message_text=self._message_text)
# Additionally log to a file