'commit'
This commit is contained in:
@@ -489,6 +489,10 @@ class SqlTemplateLoader:
|
||||
template_map_str = await redisKit.get_data(REDIS_SQL_TEMPLATE_MAP_KEY)
|
||||
if template_map_str:
|
||||
self._template_map = json.loads(template_map_str)
|
||||
|
||||
# 无论从Redis加载了什么,都尝试重新构建一次映射以确保一致性
|
||||
if self.templates and not self._template_map:
|
||||
self._build_template_map()
|
||||
|
||||
except Exception as e:
|
||||
logger.error(f"从Redis加载SQL模板数据失败: {str(e)}")
|
||||
|
||||
Reference in New Issue
Block a user