[Update/bugfix] UI: Watchdogタイマーに10秒間隔で信号を送るように。
backend watchdog関数の引数エラーの修正
This commit is contained in:
@@ -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秒
|
||||
};
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user