fix plugin state
This commit is contained in:
@ -27,18 +27,21 @@ class DirMonitor(_PluginBase):
|
||||
|
||||
# 私有属性
|
||||
_monitor = None
|
||||
_enable = False
|
||||
_enabled = False
|
||||
|
||||
def init_plugin(self, config: dict = None):
|
||||
# 读取配置
|
||||
if config:
|
||||
self._enable = config.get("enable")
|
||||
self._enabled = config.get("enabled")
|
||||
|
||||
# 停止现有任务
|
||||
self.stop_service()
|
||||
|
||||
# TODO 启动任务
|
||||
|
||||
def get_state(self) -> bool:
|
||||
return self._enabled
|
||||
|
||||
@staticmethod
|
||||
def get_command() -> List[Dict[str, Any]]:
|
||||
pass
|
||||
|
Reference in New Issue
Block a user