[Update/bugfix] UI: Watchdogタイマーに10秒間隔で信号を送るように。

backend watchdog関数の引数エラーの修正
This commit is contained in:
Sakamoto Shiina
2024-09-26 12:31:50 +09:00
parent 11e4c12f85
commit 726dff60bd
3 changed files with 12 additions and 1 deletions

View File

@@ -68,6 +68,8 @@ const StartPythonFacadeComponent = () => {
main_page.setDecorations(true);
if (!hasRunRef.current) {
asyncStartPython().then((result) => {
startFeedingToWatchDog();
getUiLanguage();
getIsMainPageCompactMode();
@@ -133,4 +135,12 @@ const ConfigPageCloseTrigger = () => {
}
}, [currentIsOpenedConfigPage]);
return null;
};
import { useStdoutToPython } from "@logics/useStdoutToPython";
const startFeedingToWatchDog = () => {
const { asyncStdoutToPython } = useStdoutToPython();
setInterval(() => {
asyncStdoutToPython("/run/feed_watchdog");
}, 10000); // 10000ミリ秒 = 10秒
};

View File

@@ -68,6 +68,7 @@ export const useReceiveRoutes = () => {
} = useVolume();
const routes = {
"/run/feed_watchdog": () => {},
// Main Page
// Page Controls
"/get/data/main_window_sidebar_compact_mode": updateIsMainPageCompactMode,