mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-11-03 22:04:57 +08:00
fix(types): complete PostgreSQL module lifecycle
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from typing import Tuple, Union
|
||||
from typing import Optional, Tuple
|
||||
|
||||
from app.application.database import get_database_governance
|
||||
from app.modules import _ModuleBase
|
||||
@@ -41,7 +41,7 @@ class PostgreSQLModule(_ModuleBase):
|
||||
"""
|
||||
return 0
|
||||
|
||||
def init_setting(self) -> Tuple[str, Union[str, bool]]:
|
||||
def init_setting(self) -> None:
|
||||
"""数据库类型由部署配置决定,不声明独立模块开关。"""
|
||||
pass
|
||||
|
||||
@@ -49,7 +49,7 @@ class PostgreSQLModule(_ModuleBase):
|
||||
"""连接池由数据库生命周期释放,本模块无独立资源。"""
|
||||
pass
|
||||
|
||||
def test(self):
|
||||
def test(self) -> Optional[Tuple[bool, str]]:
|
||||
"""
|
||||
测试模块连接性
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user