From 113f81dffe1d7f94fc5085ffb926930a0fd274b2 Mon Sep 17 00:00:00 2001 From: Arnaud M Date: Sun, 2 Feb 2025 13:01:22 +0100 Subject: [PATCH] Stop using eventlet for action heartbeat threads Change-Id: I45f568ca56662d5ff0b892096c07b88350c32e35 Signed-off-by: Arnaud M --- mistral/services/action_heartbeat_checker.py | 4 ++-- mistral/services/action_heartbeat_sender.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mistral/services/action_heartbeat_checker.py b/mistral/services/action_heartbeat_checker.py index 80e3f3a65..b44dd121f 100644 --- a/mistral/services/action_heartbeat_checker.py +++ b/mistral/services/action_heartbeat_checker.py @@ -13,7 +13,7 @@ # limitations under the License. import datetime -import eventlet +import threading import time from mistral import context as auth_ctx @@ -137,7 +137,7 @@ def start(): _stopped = False - eventlet.spawn_after(wait_time, _loop) + threading.Timer(wait_time, _loop).start() def stop(graceful=False): diff --git a/mistral/services/action_heartbeat_sender.py b/mistral/services/action_heartbeat_sender.py index 62e765e9e..694c3d915 100644 --- a/mistral/services/action_heartbeat_sender.py +++ b/mistral/services/action_heartbeat_sender.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import eventlet +import threading import time from oslo_config import cfg @@ -101,7 +101,7 @@ def start(): _stopped = False - eventlet.spawn(_loop) + threading.Thread(target=_loop).start() def stop(graceful=False):