调整插件加载逻辑
This commit is contained in:
@@ -2,7 +2,7 @@ import logging
|
||||
import threading
|
||||
from typing import Dict, Any, Tuple, Optional, List
|
||||
|
||||
from plugin_common.plugin_interface import PluginInterface
|
||||
from plugin_common.plugin_interface import PluginInterface, PluginStatus
|
||||
from .dashboard_server import DashboardServer
|
||||
|
||||
|
||||
@@ -144,3 +144,15 @@ class StatsDashboardPlugin(PluginInterface):
|
||||
"""关闭插件"""
|
||||
if self.server:
|
||||
self.stop_server()
|
||||
|
||||
def start(self) -> bool:
|
||||
"""启动插件"""
|
||||
self.status = PluginStatus.RUNNING
|
||||
self.LOG.info(f"{self.name} 插件已启动")
|
||||
return True
|
||||
|
||||
def stop(self) -> bool:
|
||||
"""停止插件"""
|
||||
self.status = PluginStatus.STOPPED
|
||||
self.LOG.info(f"{self.name} 插件已停止")
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user