1
0
mirror of https://github.com/hanxi/xiaomusic.git synced 2026-03-18 08:43:17 +08:00

解决js插件启动报错

This commit is contained in:
涵曦
2026-01-14 20:49:30 +08:00
parent 95a35cab13
commit aa80e18bb7

View File

@@ -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")