commit 523a1f5e06bea0e18da24b055899df8a538a05ce Author: Damian Johnson atagar@torproject.org Date: Sun Oct 15 08:58:54 2017 -0700
Cpu usage pegged when paused
When paused daemon updates turned into a busy loop, pegging the cpu. Actually, I'm unsure why we're checking the paused status at all since daemons still run in the background. --- nyx/panel/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/nyx/panel/__init__.py b/nyx/panel/__init__.py index 3e1aa61..ed32887 100644 --- a/nyx/panel/__init__.py +++ b/nyx/panel/__init__.py @@ -203,7 +203,7 @@ class DaemonPanel(Panel, threading.Thread): last_ran = None
while not self._halt: - if nyx_interface().is_paused() or (last_ran and time.time() - last_ran < self._update_rate): + if last_ran and time.time() - last_ran < self._update_rate: sleep_until = last_ran + self._update_rate + 0.1
while not self._halt and time.time() < sleep_until: