1
0
mirror of https://github.com/fHDHR/fHDHR_NextPVR.git synced 2025-12-06 05:36:59 -05:00

Compare commits

...

2 Commits

Author SHA1 Message Date
Deathbybandaid
db49d28de5
Merge pull request #124 from deathbybandaid/dev
Reduce CPU Usage
2021-01-09 15:52:22 -05:00
deathbybadaid
1f23425be5 Reduce CPU Usage 2021-01-09 15:44:59 -05:00

View File

@ -1,6 +1,7 @@
import os import os
import sys import sys
import argparse import argparse
import time
from fHDHR import fHDHR_VERSION, fHDHR_OBJ from fHDHR import fHDHR_VERSION, fHDHR_OBJ
import fHDHR.exceptions 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") fhdhr.api.get("/api/startup_tasks")
# wait forever # wait forever
while fhdhr.threads["flask"].is_alive():
restart_code = "restart" restart_code = "restart"
while fhdhr.threads["flask"].is_alive():
time.sleep(1)
return restart_code return restart_code
except KeyboardInterrupt: except KeyboardInterrupt: