fix restart

This commit is contained in:
jxxghp
2025-06-10 07:09:59 +08:00
parent 49dae92b8e
commit 162ba9307d
4 changed files with 33 additions and 61 deletions
+2 -2
View File
@@ -12,7 +12,7 @@ from app.startup.plugins_initializer import init_plugins, stop_plugins, sync_plu
from app.startup.routers_initializer import init_routers
from app.startup.scheduler_initializer import stop_scheduler, init_scheduler, init_plugin_scheduler
from app.startup.workflow_initializer import init_workflow, stop_workflow
from app.utils.system import SystemUtils
from app.helper.system import SystemHelper
async def init_extra():
@@ -25,7 +25,7 @@ async def init_extra():
# 重新注册命令
restart_command()
# 设置系统已修改标志
SystemUtils.set_system_modified()
SystemHelper().set_system_modified()
# 重启完成
SystemChain().restart_finish()
+3 -2
View File
@@ -5,6 +5,7 @@ from app.core.config import settings
from app.core.plugin import PluginManager
from app.log import logger
from app.utils.system import SystemUtils
from app.helper.system import SystemHelper
async def sync_plugins() -> bool:
@@ -147,8 +148,8 @@ def restore_plugins():
return
# 系统被重置才恢复插件
if SystemUtils.is_system_reset():
if SystemHelper().is_system_reset():
# 确保插件目录存在
plugins_dir.mkdir(parents=True, exist_ok=True)