mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-07-07 15:51:28 +08:00
feat:模块健康检查
This commit is contained in:
@@ -19,6 +19,15 @@ class SlackModule(_ModuleBase):
|
||||
def stop(self):
|
||||
self.slack.stop()
|
||||
|
||||
def test(self) -> Tuple[bool, str]:
|
||||
"""
|
||||
测试模块连接性
|
||||
"""
|
||||
state = self.slack.get_state()
|
||||
if state:
|
||||
return True, ""
|
||||
return False, "Slack未就续,请检查参数设置和网络连接"
|
||||
|
||||
def init_setting(self) -> Tuple[str, Union[str, bool]]:
|
||||
return "MESSAGER", "slack"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user