Blame SOURCES/0002-Do-not-busy-wait-when-playbook-is-running.patch

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