Merge branch 'watchdog' into for_webui

# Conflicts:
#	src-python/webui_controller.py
#	src-python/webui_mainloop.py
This commit is contained in:
misyaguziya
2024-10-10 22:36:23 +09:00
7 changed files with 97 additions and 5 deletions

View File

@@ -91,6 +91,8 @@ const StartPythonFacadeComponent = () => {
useEffect(() => {
if (!hasRunRef.current) {
asyncStartPython().then((result) => {
startFeedingToWatchDog();
getUiLanguage();
getUiScaling();
getMessageLogUiScaling();
@@ -245,4 +247,12 @@ const TransparencyController = () => {
}, [currentTransparency.data]);
return null;
};
import { useStdoutToPython } from "@logics/useStdoutToPython";
const startFeedingToWatchDog = () => {
const { asyncStdoutToPython } = useStdoutToPython();
setInterval(() => {
asyncStdoutToPython("/run/feed_watchdog");
}, 20000); // 20000ミリ秒 = 20秒
};

View File

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