5 from typing import Dict
11 logger = logging.getLogger(__file__)
14 class periodic_health_renderer(renderer.abstaining_renderer):
15 def __init__(self, name_to_timeout_dict: Dict[str, int]) -> None:
16 super().__init__(name_to_timeout_dict)
18 def periodic_render(self, key: str) -> bool:
19 with file_writer.file_writer("periodic-health_6_300.html") as f:
20 command = "/home/pi/bin/cronhealth.py --kiosk_mode"
21 p = subprocess.Popen(command, shell=True, bufsize=0, stdout=subprocess.PIPE)
22 for line in iter(p.stdout.readline, b''):
23 f.write(line.decode("utf-8"))
27 #test = periodic_health_renderer({"Test", 123})
28 #test.periodic_render("Test")