From dba168bf7e00de5b534603019efa513cfa053716 Mon Sep 17 00:00:00 2001
From: Jeremy Audet <audet.jeremy@pm.me>
Date: Thu, 4 Aug 2022 17:38:51 -0400
Subject: [PATCH] Do not busy-wait when playbook is running
Resolves: rhbz#2104199
(cherry picked from commit 579a67fba5ea60543a72b118e5644206c6ba720b)
---
rhc_worker_playbook/server.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/rhc_worker_playbook/server.py b/rhc_worker_playbook/server.py
index 8fa393f..8e9826f 100644
--- a/rhc_worker_playbook/server.py
+++ b/rhc_worker_playbook/server.py
@@ -235,6 +235,7 @@ class WorkerService(yggdrasil_pb2_grpc.WorkerServicer):
elapsedTime = 0
startTime = time.time()
while runnerThread.is_alive():
+ time.sleep(1)
elapsedTime = time.time() - startTime
if elapsedTime >= response_interval:
# hit the interval, post events