👍️[Update] Model : Watchdogタイマー機能を追加

"/run/feed_watchdog"でタイマーを定期的にリセットする必要あり
This commit is contained in:
misyaguziya
2024-09-26 08:17:38 +09:00
parent d6c6694700
commit 11e4c12f85
5 changed files with 74 additions and 2 deletions

View File

@@ -1527,6 +1527,21 @@ class Controller:
th_download.daemon = True
th_download.start()
@staticmethod
def startWatchdog() -> dict:
model.startWatchdog()
return {"status":200, "result":True}
@staticmethod
def feedWatchdog() -> dict:
model.feedWatchdog()
return {"status":200, "result":True}
@staticmethod
def stopWatchdog() -> dict:
model.stopWatchdog()
return {"status":200, "result":True}
def init(self, *args, **kwargs) -> None:
printLog("Start Initialization")
@@ -1591,4 +1606,6 @@ class Controller:
device_manager.setCallbackMicDeviceList(self.updateMicDeviceList)
device_manager.setCallbackSpeakerDeviceList(self.updateSpeakerDeviceList)
printLog("End Initialization")
printLog("End Initialization")
self.startWatchdog()