From 1f23425be58385fd135b866885493a7c5760f399 Mon Sep 17 00:00:00 2001 From: deathbybadaid Date: Sat, 9 Jan 2021 15:44:59 -0500 Subject: [PATCH] Reduce CPU Usage --- fHDHR/cli/run.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fHDHR/cli/run.py b/fHDHR/cli/run.py index fa64582..68e6141 100644 --- a/fHDHR/cli/run.py +++ b/fHDHR/cli/run.py @@ -1,6 +1,7 @@ import os import sys import argparse +import time from fHDHR import fHDHR_VERSION, fHDHR_OBJ import fHDHR.exceptions @@ -51,8 +52,9 @@ def run(settings, logger, db, script_dir, fHDHR_web, origin, alternative_epg): fhdhr.api.get("/api/startup_tasks") # wait forever + restart_code = "restart" while fhdhr.threads["flask"].is_alive(): - restart_code = "restart" + time.sleep(1) return restart_code except KeyboardInterrupt: