From 5160370b7a6603c0dce486ff3805403fc6986a28 Mon Sep 17 00:00:00 2001 From: Jeremy Audet Date: Thu, 4 Aug 2022 17:38:51 -0400 Subject: [PATCH] Do not busy-wait when playbook is running Resolves: rhbz#2137008 See: https://issues.redhat.com/browse/RHELPLAN-130334 (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