diff mbox series

[1/2] server/process: Don't send heartbeats when no idle functions

Message ID 20241105150628.2827698-1-richard.purdie@linuxfoundation.org
State Accepted, archived
Commit 9a2d5e63b07c3912838781776c61f0f1ac9640e1
Headers show
Series [1/2] server/process: Don't send heartbeats when no idle functions | expand

Commit Message

Richard Purdie Nov. 5, 2024, 3:06 p.m. UTC
If there are no idle functions present, don't sent heartbeat events. These
are only meant to happen while builds are active.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 lib/bb/server/process.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py
index ad4035a738..b627ae0ab6 100644
--- a/lib/bb/server/process.py
+++ b/lib/bb/server/process.py
@@ -477,7 +477,7 @@  class ProcessServer():
 
             # Create new heartbeat event?
             now = time.time()
-            if bb.event._heartbeat_enabled and now >= self.next_heartbeat:
+            if items and bb.event._heartbeat_enabled and now >= self.next_heartbeat:
                 # We might have missed heartbeats. Just trigger once in
                 # that case and continue after the usual delay.
                 self.next_heartbeat += self.heartbeat_seconds