[Update/bugfix] UI: Watchdogタイマーに10秒間隔で信号を送るように。
backend watchdog関数の引数エラーの修正
This commit is contained in:
@@ -1533,7 +1533,7 @@ class Controller:
|
|||||||
return {"status":200, "result":True}
|
return {"status":200, "result":True}
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def feedWatchdog() -> dict:
|
def feedWatchdog(*args, **kwargs) -> dict:
|
||||||
model.feedWatchdog()
|
model.feedWatchdog()
|
||||||
return {"status":200, "result":True}
|
return {"status":200, "result":True}
|
||||||
|
|
||||||
|
|||||||
@@ -68,6 +68,8 @@ const StartPythonFacadeComponent = () => {
|
|||||||
main_page.setDecorations(true);
|
main_page.setDecorations(true);
|
||||||
if (!hasRunRef.current) {
|
if (!hasRunRef.current) {
|
||||||
asyncStartPython().then((result) => {
|
asyncStartPython().then((result) => {
|
||||||
|
startFeedingToWatchDog();
|
||||||
|
|
||||||
getUiLanguage();
|
getUiLanguage();
|
||||||
getIsMainPageCompactMode();
|
getIsMainPageCompactMode();
|
||||||
|
|
||||||
@@ -134,3 +136,11 @@ const ConfigPageCloseTrigger = () => {
|
|||||||
}, [currentIsOpenedConfigPage]);
|
}, [currentIsOpenedConfigPage]);
|
||||||
return null;
|
return null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
import { useStdoutToPython } from "@logics/useStdoutToPython";
|
||||||
|
const startFeedingToWatchDog = () => {
|
||||||
|
const { asyncStdoutToPython } = useStdoutToPython();
|
||||||
|
setInterval(() => {
|
||||||
|
asyncStdoutToPython("/run/feed_watchdog");
|
||||||
|
}, 10000); // 10000ミリ秒 = 10秒
|
||||||
|
};
|
||||||
@@ -68,6 +68,7 @@ export const useReceiveRoutes = () => {
|
|||||||
} = useVolume();
|
} = useVolume();
|
||||||
|
|
||||||
const routes = {
|
const routes = {
|
||||||
|
"/run/feed_watchdog": () => {},
|
||||||
// Main Page
|
// Main Page
|
||||||
// Page Controls
|
// Page Controls
|
||||||
"/get/data/main_window_sidebar_compact_mode": updateIsMainPageCompactMode,
|
"/get/data/main_window_sidebar_compact_mode": updateIsMainPageCompactMode,
|
||||||
|
|||||||
Reference in New Issue
Block a user