INNER CODE UNIT · Python
monitor_run
bkbilly/lnxlink · lnxlink/__main__.py:313
def monitor_run(self):
"""Gets information from each Addon and adds it to the queue"""
while not self.stop_event.is_set():
if not self.kill:
self.run_modules()
if self.stop_event.wait(timeout=self.config["update_interval"]):
break
else:
if self.stop_event.wait(timeout=0.1):
break
logger.info("Stopped monitor_run")
def monitor_queue(self):
"""Loop through the queue list and publish data to MQTT broker"""
while not self.stop_event.is_set():
if not self.kill:
name, queue_data = self.publ_queue.get_item(timeout=0.5)
if name is not None and queue_data is not None: