From 45ec60a3663c9c9857e0eafd2be43716804740d6 Mon Sep 17 00:00:00 2001 From: 3ll3d00d Date: Fri, 29 Dec 2023 10:46:48 +0000 Subject: [PATCH] add errback to pj --- cmdserver/pjcontroller.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmdserver/pjcontroller.py b/cmdserver/pjcontroller.py index 01a7be0..5c55b51 100644 --- a/cmdserver/pjcontroller.py +++ b/cmdserver/pjcontroller.py @@ -35,7 +35,9 @@ def __init__(self, config, mqtt: Optional[MQTT]): from twisted.internet import task self.__looping = task.LoopingCall(self.refresh) logger.info(f'Initiating PJ refresh every 20s') - self.__looping.start(20, now=False) + d = self.__looping.start(20, now=False) + from twisted.python import log + d.addErrback(log.err) def refresh(self) -> Deferred: return threads.deferToThread(self.__update_state)