From aa80e18bb7cfd161a9382ad03eb0f1e1eaf43ad7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B6=B5=E6=9B=A6?= Date: Wed, 14 Jan 2026 20:49:30 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3js=E6=8F=92=E4=BB=B6=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xiaomusic/js_plugin_manager.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xiaomusic/js_plugin_manager.py b/xiaomusic/js_plugin_manager.py index 39ccdaa..e639064 100644 --- a/xiaomusic/js_plugin_manager.py +++ b/xiaomusic/js_plugin_manager.py @@ -34,6 +34,11 @@ class JSPluginManager: self.pending_requests = {} self._is_shutting_down = False # 添加关闭标志 + # ... 配置文件相关 ... + self._config_cache = None + self._config_cache_time = 0 + self._config_cache_ttl = 3 * 60 # 缓存有效期5秒,可根据需要调整 + # 启动 Node.js 子进程 self._start_node_process() @@ -43,11 +48,6 @@ class JSPluginManager: # 加载插件 self._load_plugins() - # ... 配置文件相关 ... - self._config_cache = None - self._config_cache_time = 0 - self._config_cache_ttl = 3 * 60 # 缓存有效期5秒,可根据需要调整 - def _start_node_process(self): """启动 Node.js 子进程""" runner_path = os.path.join(os.path.dirname(__file__), "js_plugin_runner.js")