From c634b4640aa6dcda15db1b986d2706f4a7160c35 Mon Sep 17 00:00:00 2001 From: Justin Paul Date: Wed, 8 Mar 2023 09:35:23 -0500 Subject: [PATCH] Update python-node-exporter.py --- app/python-node-exporter.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/python-node-exporter.py b/app/python-node-exporter.py index 8d89d59..2bee167 100644 --- a/app/python-node-exporter.py +++ b/app/python-node-exporter.py @@ -388,6 +388,7 @@ def start_thread(target_func): auth_thread = start_thread(ZvmAuthHandler) data_thread = start_thread(GetDataFunc) stats_thread = start_thread(GetStatsFunc) +webserver_thread = start_thread(WebServer) # loop indefinitely while True: @@ -404,3 +405,7 @@ while True: # restart the thread print("Starting GetStatsFunc Thread") stats_thread = start_thread(GetStatsFunc) + if not webserver_thread.is_alive(): + # restart the thread + print("Starting WebServer Thread") + webserver_thread = start_thread(WebServer) \ No newline at end of file