动态类型列表上线

This commit is contained in:
2025-11-14 21:15:02 +08:00
parent e2c93d6933
commit ee46e4cebb
5 changed files with 70 additions and 7 deletions

View File

@@ -17,8 +17,10 @@ class ElasticConfig(AppConfig):
return
# 延迟导入,避免循环导入或过早加载
from .es_connect import create_index_with_mapping
from .es_connect import create_index_with_mapping, get_type_list
try:
create_index_with_mapping()
types = get_type_list()
print(f"🔎 启动时 type_list: {types}")
except Exception as e:
print(f"❌ ES 初始化失败: {e}")