Skip to content

Commit

Permalink
add errback to pj
Browse files Browse the repository at this point in the history
  • Loading branch information
3ll3d00d committed Dec 29, 2023
1 parent b1f2254 commit 45ec60a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmdserver/pjcontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 45ec60a

Please # to comment.