feat: 添加多线程架构支持并优化性能
实现线程管理器以支持高并发场景,添加GIL-free模式提升Python 3.14下的多线程性能 新增B站API集成和本地文件服务器功能,改进镜像插件支持GIF处理 更新文档说明多线程架构和GIL-free模式的使用方法
This commit is contained in:
@@ -7,7 +7,7 @@ from pathlib import Path
|
||||
|
||||
import tomllib
|
||||
from pydantic import ValidationError
|
||||
from .config_models import ConfigModel, NapCatWSModel, BotModel, RedisModel, DockerModel, ImageManagerModel, MySQLModel, ReverseWSModel
|
||||
from .config_models import ConfigModel, NapCatWSModel, BotModel, RedisModel, DockerModel, ImageManagerModel, MySQLModel, ReverseWSModel, ThreadingModel, BilibiliModel, LocalFileServerModel
|
||||
from .utils.logger import ModuleLogger
|
||||
from .utils.exceptions import ConfigError, ConfigNotFoundError, ConfigValidationError
|
||||
|
||||
@@ -136,6 +136,27 @@ class Config:
|
||||
"""
|
||||
return self._model.reverse_ws
|
||||
|
||||
@property
|
||||
def threading(self) -> ThreadingModel:
|
||||
"""
|
||||
获取线程管理配置
|
||||
"""
|
||||
return self._model.threading
|
||||
|
||||
@property
|
||||
def bilibili(self) -> BilibiliModel:
|
||||
"""
|
||||
获取 Bilibili 配置
|
||||
"""
|
||||
return self._model.bilibili
|
||||
|
||||
@property
|
||||
def local_file_server(self) -> LocalFileServerModel:
|
||||
"""
|
||||
获取本地文件服务器配置
|
||||
"""
|
||||
return self._model.local_file_server
|
||||
|
||||
|
||||
|
||||
# 实例化全局配置对象
|
||||
|
||||
Reference in New Issue
Block a user