mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-04 21:06:03 +00:00
perf: 完善插件加载流程
This commit is contained in:
@@ -47,7 +47,13 @@ class PluginManager:
|
||||
self.plugins.sort(key=lambda x: x.priority, reverse=True)
|
||||
|
||||
async def initialize_plugins(self):
|
||||
pass
|
||||
for plugin in self.plugins:
|
||||
try:
|
||||
plugin.plugin_inst = plugin.plugin_class(self.api_host)
|
||||
except Exception as e:
|
||||
self.ap.logger.error(f'插件 {plugin.plugin_name} 初始化失败: {e}')
|
||||
self.ap.logger.exception(e)
|
||||
continue
|
||||
|
||||
async def install_plugin(
|
||||
self,
|
||||
|
||||
Reference in New Issue
Block a user