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

4d5c3e
From 5160370b7a6603c0dce486ff3805403fc6986a28 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
4d5c3e
Resolves: rhbz#2137008
4d5c3e
4d5c3e
See: https://issues.redhat.com/browse/RHELPLAN-130334
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