Update action_manager.py
This commit is contained in:
@@ -75,8 +75,8 @@ class PluginActionWrapper(BaseAction):
|
|||||||
self.parallel_action = getattr(self.plugin_action, "parallel_action", True)
|
self.parallel_action = getattr(self.plugin_action, "parallel_action", True)
|
||||||
self.enable_plugin = True
|
self.enable_plugin = True
|
||||||
|
|
||||||
async def handle_action(self) -> tuple[bool, str]:
|
async def execute(self) -> tuple[bool, str]:
|
||||||
"""兼容旧系统的动作处理接口,委托给插件Action的execute方法"""
|
"""实现抽象方法execute,委托给插件Action的execute方法"""
|
||||||
try:
|
try:
|
||||||
# 调用插件Action的execute方法
|
# 调用插件Action的execute方法
|
||||||
success, response = await self.plugin_action.execute()
|
success, response = await self.plugin_action.execute()
|
||||||
@@ -88,6 +88,10 @@ class PluginActionWrapper(BaseAction):
|
|||||||
logger.error(f"插件Action {self.action_name} 执行异常: {e}")
|
logger.error(f"插件Action {self.action_name} 执行异常: {e}")
|
||||||
return False, f"插件Action执行失败: {str(e)}"
|
return False, f"插件Action执行失败: {str(e)}"
|
||||||
|
|
||||||
|
async def handle_action(self) -> tuple[bool, str]:
|
||||||
|
"""兼容旧系统的动作处理接口,委托给execute方法"""
|
||||||
|
return await self.execute()
|
||||||
|
|
||||||
|
|
||||||
class ActionManager:
|
class ActionManager:
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user