'commit'
This commit is contained in:
@@ -12,11 +12,6 @@ from pydantic import SecretStr
|
|||||||
|
|
||||||
from Config import Config
|
from Config import Config
|
||||||
|
|
||||||
# 禁用HTTPS相关警告
|
|
||||||
def disableWarning():
|
|
||||||
# 抑制HTTPS相关警告
|
|
||||||
warnings.filterwarnings('ignore', message='Connecting to .* using TLS with verify_certs=False is insecure')
|
|
||||||
warnings.filterwarnings('ignore', message='Unverified HTTPS request is being made to host')
|
|
||||||
|
|
||||||
# 初始化日志
|
# 初始化日志
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
@@ -28,8 +23,10 @@ class EsSearchUtil:
|
|||||||
初始化Elasticsearch搜索工具
|
初始化Elasticsearch搜索工具
|
||||||
:param es_config: Elasticsearch配置字典,包含hosts, username, password, index_name等
|
:param es_config: Elasticsearch配置字典,包含hosts, username, password, index_name等
|
||||||
"""
|
"""
|
||||||
# 禁用警告
|
# 抑制HTTPS相关警告
|
||||||
disableWarning()
|
warnings.filterwarnings('ignore', message='Connecting to .* using TLS with verify_certs=False is insecure')
|
||||||
|
warnings.filterwarnings('ignore', message='Unverified HTTPS request is being made to host')
|
||||||
|
|
||||||
self.es_config = es_config
|
self.es_config = es_config
|
||||||
|
|
||||||
# 初始化连接池
|
# 初始化连接池
|
||||||
|
Reference in New Issue
Block a user